Skip to content

Commit dc7ae9e

Browse files
author
Bruno da Silva de Oliveira
committed
- removed "header_code", since we already have Include().
[SVN r19670]
1 parent 929badf commit dc7ae9e

4 files changed

Lines changed: 3 additions & 42 deletions

File tree

pyste/src/Pyste/IncludeExporter.py

Lines changed: 0 additions & 24 deletions
This file was deleted.

pyste/src/Pyste/infos.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,6 @@ def __init__(self, name, include, tail=None, otherInfo=None):
8181
exporter.interface_file = exporters.current_interface
8282

8383

84-
#==============================================================================
85-
# IncludeInfo
86-
#==============================================================================
87-
class IncludeInfo(DeclarationInfo):
88-
89-
def __init__(self, include):
90-
DeclarationInfo.__init__(self)
91-
self._Attribute('include', include)
92-
exporter = IncludeExporter(InfoWrapper(self))
93-
if exporter not in exporters.exporters:
94-
exporters.exporters.append(exporter)
95-
exporter.interface_file = exporters.current_interface
96-
97-
9884
#==============================================================================
9985
# templates
10086
#==============================================================================

pyste/src/Pyste/pyste.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import time
4444
from declarations import Typedef
4545

46-
__version__ = '0.9.15'
46+
__version__ = '0.9.16'
4747

4848
def RecursiveIncludes(include):
4949
'Return a list containg the include dir and all its subdirectories'
@@ -167,7 +167,7 @@ def CreateContext():
167167
# infos
168168
context['Function'] = infos.FunctionInfo
169169
context['Class'] = infos.ClassInfo
170-
context['Include'] = infos.IncludeInfo
170+
context['Include'] = lambda header: infos.CodeInfo('#include <%s>\n' % header, 'include')
171171
context['Template'] = infos.ClassTemplateInfo
172172
context['Enum'] = infos.EnumInfo
173173
context['AllFromHeader'] = infos.HeaderInfo
@@ -193,7 +193,6 @@ def CreateContext():
193193
context['manage_new_object'] = manage_new_object
194194
# utils
195195
context['Wrapper'] = exporterutils.FunctionWrapper
196-
context['header_code'] = lambda code: infos.CodeInfo(code, 'include')
197196
context['declaration_code'] = lambda code: infos.CodeInfo(code, 'declaration')
198197
context['global_declaration_code'] = lambda code: infos.CodeInfo(code, 'declaration-outside')
199198
context['module_code'] = lambda code: infos.CodeInfo(code, 'module')

pyste/tests/code_test.pyste

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Class('A', 'code_test.h')
2-
header_code('#include <string>\n')
2+
Include('string')
33
global_declaration_code('''
44
int get(A& a) { return a.x; }
55

0 commit comments

Comments
 (0)