Skip to content

Commit ba0fcd2

Browse files
author
Bruno da Silva de Oliveira
committed
- Various bug fixes
- Changed the internal code to the way it was [SVN r18941]
1 parent d476e67 commit ba0fcd2

30 files changed

Lines changed: 471 additions & 421 deletions

pyste/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
4 July 2003
2+
Applied patch that solved a bug in ClassExporter and added a distutils install
3+
script (install/setup.py), both contributed by Prabhu Ramachandran.
4+
Thanks Prabhu!
5+
16
2 July 2003
27
Jim Wilson found a bug where types like "char**" were being interpreted as
38
"char*". Thanks Jim!

pyste/TODO

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66

77
- Expose programmability to the Pyste files (listing members of a class, for
88
instance)
9+
10+
- Virtual operators

pyste/install/pyste.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env python
2+
3+
from Pyste import pyste
4+
pyste.main()

pyste/install/setup.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# contributed by Prabhu Ramachandran
2+
3+
from distutils.core import setup
4+
import sys
5+
6+
setup (name = "Pyste",
7+
version = "0.9.7",
8+
description = "Pyste - Python Semi-Automatic Exporter",
9+
maintainer = "Bruno da Silva de Oliveira",
10+
maintainer_email = "nicodemus@globalite.com.br",
11+
licence = "Boost License",
12+
long_description = "Pyste is a Boost.Python code generator",
13+
url = "http://www.boost.org/libs/python/pyste/index.html",
14+
platforms = ['Any'],
15+
packages = ['Pyste'],
16+
scripts = ['pyste.py'],
17+
package_dir = {'Pyste': '../src/Pyste'},
18+
)
Lines changed: 121 additions & 121 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ def Export(self, codeunit, expoted_names):
2121
if not self.info.exclude:
2222
indent = self.INDENT
2323
in_indent = self.INDENT*2
24-
rename = self.info.rename or self.enum._name
25-
full_name = self.enum._FullName()
24+
rename = self.info.rename or self.enum.name
25+
full_name = self.enum.FullName()
2626
if rename == "$_0" or rename == '._0':
2727
full_name = "int"
2828
rename = "unnamed"
2929
code = indent + namespaces.python
3030
code += 'enum_< %s >("%s")\n' % (full_name, rename)
31-
for name in self.enum._values:
31+
for name in self.enum.values:
3232
rename = self.info[name].rename or name
33-
value_fullname = self.enum._ValueFullName(name)
33+
value_fullname = self.enum.ValueFullName(name)
3434
code += in_indent + '.value("%s", %s)\n' % (rename, value_fullname)
3535
code += indent + ';\n\n'
3636
codeunit.Write('module', code)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def Export(self, codeunit, exported_names):
5555
def GetDeclarations(self, fullname):
5656
decls = []
5757
for decl in self.declarations:
58-
if decl._FullName() == fullname:
58+
if decl.FullName() == fullname:
5959
decls.append(decl)
6060
if not decls:
6161
raise RuntimeError, 'no %s declaration found!' % fullname
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ def Export(self, codeunit, exported_names):
2828

2929

3030
def ExportDeclaration(self, decl, unique, codeunit):
31-
name = self.info.rename or decl._name
31+
name = self.info.rename or decl.name
3232
defs = namespaces.python + 'def("%s", ' % name
3333
wrapper = self.info.wrapper
3434
if wrapper:
3535
pointer = '&' + wrapper.FullName()
3636
else:
37-
pointer = decl._PointerDeclaration()
37+
pointer = decl.PointerDeclaration()
3838
defs += pointer
3939
defs += self.PolicyCode()
4040
overload = self.OverloadName(decl)
@@ -48,9 +48,9 @@ def ExportDeclaration(self, decl, unique, codeunit):
4848

4949

5050
def OverloadName(self, decl):
51-
if decl._minArgs != decl._maxArgs:
51+
if decl.minArgs != decl.maxArgs:
5252
return '%s_overloads_%i_%i' % \
53-
(decl._name, decl._minArgs, decl._maxArgs)
53+
(decl.name, decl.minArgs, decl.maxArgs)
5454
else:
5555
return ''
5656

@@ -61,7 +61,7 @@ def GenerateOverloads(self, declarations, codeunit):
6161
overload = self.OverloadName(decl)
6262
if overload and overload not in codes:
6363
code = 'BOOST_PYTHON_FUNCTION_OVERLOADS(%s, %s, %i, %i)' %\
64-
(overload, decl._FullName(), decl._minArgs, decl_.maxArgs)
64+
(overload, decl.FullName(), decl.minArgs, decl_.maxArgs)
6565
codeunit.Write('declaration', code + '\n')
6666
codes[overload] = None
6767

@@ -77,7 +77,7 @@ def PolicyCode(self):
7777

7878
def ExportOpaquePointer(self, function, codeunit):
7979
if self.info.policy == return_value_policy(return_opaque_pointer):
80-
type = function._result._name
80+
type = function.result.name
8181
macro = 'BOOST_PYTHON_OPAQUE_SPECIALIZED_TYPE_ID(%s)' % type
8282
if macro not in self._exported_opaque_pointers:
8383
codeunit.Write('declaration-outside', macro)

0 commit comments

Comments
 (0)