Permalink
Browse files

Replace the use of RegalEmuScopedActivate with generic Push<int>.

Add EmuFilter for preventing glClientActiveTexture calls into ES 2.0 specifically.
Updates for XCode and Visual Studio builds.
  • Loading branch information...
nigels-com committed Sep 24, 2012
1 parent b734791 commit 994fa02b6929d61dd8b99b08cc74f4dba2b2aaf4
@@ -62,6 +62,8 @@
43FC5FA315C4619B00D0177C /* RegalUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FC5F7615C4619B00D0177C /* RegalUtil.h */; };
43FC5FA415C4619B00D0177C /* RegalVao.h in Headers */ = {isa = PBXBuildFile; fileRef = 43FC5F7715C4619B00D0177C /* RegalVao.h */; };
43FC5FA715C461AC00D0177C /* mongoose.c in Sources */ = {isa = PBXBuildFile; fileRef = 43FC5FA615C461AC00D0177C /* mongoose.c */; };
+ BC020947160D1919003FAB99 /* RegalMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC020946160D1919003FAB99 /* RegalMarker.cpp */; };
+ BC020958160D1C73003FAB99 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = BC020957160D1C73003FAB99 /* md5.c */; };
BC6C912A15EE3DC60056E4F7 /* RegalDispatchGlobal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6C912915EE3DC60056E4F7 /* RegalDispatchGlobal.cpp */; };
BC921A5E15D5624600E52C91 /* RegalDispatchMissing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC921A5C15D5624600E52C91 /* RegalDispatchMissing.cpp */; };
BC921A5F15D5624600E52C91 /* RegalDispatchNacl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC921A5D15D5624600E52C91 /* RegalDispatchNacl.cpp */; };
@@ -124,6 +126,8 @@
43FC5F7615C4619B00D0177C /* RegalUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegalUtil.h; path = ../../../src/regal/RegalUtil.h; sourceTree = "<group>"; };
43FC5F7715C4619B00D0177C /* RegalVao.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegalVao.h; path = ../../../src/regal/RegalVao.h; sourceTree = "<group>"; };
43FC5FA615C461AC00D0177C /* mongoose.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mongoose.c; path = ../../../src/mongoose/mongoose.c; sourceTree = "<group>"; };
+ BC020946160D1919003FAB99 /* RegalMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalMarker.cpp; path = ../../../src/regal/RegalMarker.cpp; sourceTree = "<group>"; };
+ BC020957160D1C73003FAB99 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../src/md5/src/md5.c; sourceTree = "<group>"; };
BC6C912915EE3DC60056E4F7 /* RegalDispatchGlobal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchGlobal.cpp; path = ../../../src/regal/RegalDispatchGlobal.cpp; sourceTree = "<group>"; };
BC921A5C15D5624600E52C91 /* RegalDispatchMissing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchMissing.cpp; path = ../../../src/regal/RegalDispatchMissing.cpp; sourceTree = "<group>"; };
BC921A5D15D5624600E52C91 /* RegalDispatchNacl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchNacl.cpp; path = ../../../src/regal/RegalDispatchNacl.cpp; sourceTree = "<group>"; };
@@ -169,12 +173,13 @@
43FC5F4A15C4617A00D0177C /* Regal */ = {
isa = PBXGroup;
children = (
+ BC020956160D1C65003FAB99 /* md5 */,
+ 43FC5FA515C461A100D0177C /* mongoose */,
43EFD6F415EAADAC004080CE /* RegalDispatcher.cpp */,
43EFD6F515EAADAC004080CE /* RegalDispatcher.h */,
43EFD6F615EAADAC004080CE /* RegalDispatchStaticEGL.cpp */,
43EFD6F715EAADAC004080CE /* RegalDispatchStaticES2.cpp */,
43EFD6F815EAADAC004080CE /* RegalSystem.h */,
- 43FC5FA515C461A100D0177C /* mongoose */,
43FC5F4B15C4619B00D0177C /* linear.h */,
43FC5F4C15C4619B00D0177C /* Regal.cpp */,
43FC5F4D15C4619B00D0177C /* RegalBin.h */,
@@ -215,6 +220,7 @@
43FC5F6B15C4619B00D0177C /* RegalLookup.h */,
4366EEED15C9B54E00211205 /* RegalMac.cpp */,
43FC5F6C15C4619B00D0177C /* RegalMarker.h */,
+ BC020946160D1919003FAB99 /* RegalMarker.cpp */,
43FC5F6D15C4619B00D0177C /* RegalObj.h */,
43FC5F6E15C4619B00D0177C /* RegalPpa.h */,
43FC5F6F15C4619B00D0177C /* RegalPpc.h */,
@@ -238,6 +244,14 @@
name = mongoose;
sourceTree = "<group>";
};
+ BC020956160D1C65003FAB99 /* md5 */ = {
+ isa = PBXGroup;
+ children = (
+ BC020957160D1C73003FAB99 /* md5.c */,
+ );
+ name = md5;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -356,6 +370,8 @@
43EFD6FB15EAADAC004080CE /* RegalDispatchStaticEGL.cpp in Sources */,
43EFD6FC15EAADAC004080CE /* RegalDispatchStaticES2.cpp in Sources */,
BC6C912A15EE3DC60056E4F7 /* RegalDispatchGlobal.cpp in Sources */,
+ BC020947160D1919003FAB99 /* RegalMarker.cpp in Sources */,
+ BC020958160D1C73003FAB99 /* md5.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -365,7 +381,7 @@
43FC5EE615C45EBB00D0177C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
+ ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -383,14 +399,14 @@
HEADER_SEARCH_PATHS = ../../../include;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
SDKROOT = iphoneos;
- USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/boost";
+ USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/boost ../../../src/md5/include";
};
name = Debug;
};
43FC5EE715C45EBB00D0177C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
+ ALWAYS_SEARCH_USER_PATHS = YES;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -401,7 +417,7 @@
HEADER_SEARCH_PATHS = ../../../include;
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
SDKROOT = iphoneos;
- USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/boost";
+ USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/boost ../../../src/md5/include";
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -56,6 +56,8 @@
43A6C22A15C48D200063667E /* RegalUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A6C1FD15C48D200063667E /* RegalUtil.h */; };
43A6C22B15C48D200063667E /* RegalVao.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A6C1FE15C48D200063667E /* RegalVao.h */; };
43A6C22E15C48D3A0063667E /* mongoose.c in Sources */ = {isa = PBXBuildFile; fileRef = 43A6C22D15C48D3A0063667E /* mongoose.c */; };
+ BC02094E160D1BA3003FAB99 /* RegalMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC02094D160D1BA3003FAB99 /* RegalMarker.cpp */; };
+ BC020950160D1BD0003FAB99 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = BC02094F160D1BD0003FAB99 /* md5.c */; };
BC456F1215D55F8E0080B420 /* RegalDispatchMissing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC456F1015D55F8E0080B420 /* RegalDispatchMissing.cpp */; };
BC456F1315D55F8E0080B420 /* RegalDispatchNacl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC456F1115D55F8E0080B420 /* RegalDispatchNacl.cpp */; };
BC6C911D15EE3CDF0056E4F7 /* RegalDispatchGlobal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6C911C15EE3CDF0056E4F7 /* RegalDispatchGlobal.cpp */; };
@@ -115,6 +117,8 @@
43A6C1FD15C48D200063667E /* RegalUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegalUtil.h; path = ../../../src/regal/RegalUtil.h; sourceTree = "<group>"; };
43A6C1FE15C48D200063667E /* RegalVao.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegalVao.h; path = ../../../src/regal/RegalVao.h; sourceTree = "<group>"; };
43A6C22D15C48D3A0063667E /* mongoose.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mongoose.c; path = ../../../src/mongoose/mongoose.c; sourceTree = "<group>"; };
+ BC02094D160D1BA3003FAB99 /* RegalMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalMarker.cpp; path = ../../../src/regal/RegalMarker.cpp; sourceTree = "<group>"; };
+ BC02094F160D1BD0003FAB99 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../../src/md5/src/md5.c; sourceTree = "<group>"; };
BC456F1015D55F8E0080B420 /* RegalDispatchMissing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchMissing.cpp; path = ../../../src/regal/RegalDispatchMissing.cpp; sourceTree = "<group>"; };
BC456F1115D55F8E0080B420 /* RegalDispatchNacl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchNacl.cpp; path = ../../../src/regal/RegalDispatchNacl.cpp; sourceTree = "<group>"; };
BC6C911C15EE3CDF0056E4F7 /* RegalDispatchGlobal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegalDispatchGlobal.cpp; path = ../../../src/regal/RegalDispatchGlobal.cpp; sourceTree = "<group>"; };
@@ -153,6 +157,7 @@
43A6C1D015C48CFA0063667E /* Regal */ = {
isa = PBXGroup;
children = (
+ BC020951160D1BD8003FAB99 /* md5 */,
43A6C22C15C48D2D0063667E /* mongoose */,
43A6C1D215C48D1F0063667E /* linear.h */,
43A6C1D315C48D1F0063667E /* Regal.cpp */,
@@ -196,6 +201,7 @@
43A6C1F115C48D200063667E /* RegalLookup.cpp */,
43A6C1F215C48D200063667E /* RegalLookup.h */,
431D3C0C15C9B6F0009DD04F /* RegalMac.cpp */,
+ BC02094D160D1BA3003FAB99 /* RegalMarker.cpp */,
43A6C1F315C48D200063667E /* RegalMarker.h */,
43A6C1F415C48D200063667E /* RegalObj.h */,
43A6C1F515C48D200063667E /* RegalPpa.h */,
@@ -220,6 +226,14 @@
name = mongoose;
sourceTree = "<group>";
};
+ BC020951160D1BD8003FAB99 /* md5 */ = {
+ isa = PBXGroup;
+ children = (
+ BC02094F160D1BD0003FAB99 /* md5.c */,
+ );
+ name = md5;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -336,6 +350,8 @@
BCF889A715E079C20093B7D5 /* RegalDispatcher.cpp in Sources */,
BCF889AA15E079D80093B7D5 /* RegalDispatchStaticES2.cpp in Sources */,
BC6C911D15EE3CDF0056E4F7 /* RegalDispatchGlobal.cpp in Sources */,
+ BC02094E160D1BA3003FAB99 /* RegalMarker.cpp in Sources */,
+ BC020950160D1BD0003FAB99 /* md5.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -369,7 +385,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
- USER_HEADER_SEARCH_PATHS = ../../../src/mongoose;
+ USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/md5/include";
};
name = Debug;
};
@@ -393,7 +409,7 @@
);
MACOSX_DEPLOYMENT_TARGET = 10.7;
SDKROOT = macosx;
- USER_HEADER_SEARCH_PATHS = ../../../src/mongoose;
+ USER_HEADER_SEARCH_PATHS = "../../../src/mongoose ../../../src/md5/include";
};
name = Release;
};
@@ -58,7 +58,7 @@
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_HAS_EXCEPTIONS=0;REGAL_EXPORTS;REGAL_SYS_WGL_DECLARE_WGL;REGAL_DECL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ProjectDir)/../../../../include;$(ProjectDir)/../../../../src/boost;$(ProjectDir)/../../../../src/mongoose</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../../../../include;$(ProjectDir)/../../../../src/boost;$(ProjectDir)/../../../../src/mongoose;$(ProjectDir)/../../../../src/md5/include</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -89,7 +89,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_HAS_EXCEPTIONS=0;REGAL_EXPORTS;REGAL_SYS_WGL_DECLARE_WGL;REGAL_DECL_EXPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>$(ProjectDir)/../../../../include;$(ProjectDir)/../../../../src/boost;$(ProjectDir)/../../../../src/mongoose</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(ProjectDir)/../../../../include;$(ProjectDir)/../../../../src/boost;$(ProjectDir)/../../../../src/mongoose;$(ProjectDir)/../../../../src/md5/include</AdditionalIncludeDirectories>
<ExceptionHandling>false</ExceptionHandling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
@@ -129,13 +129,15 @@
<ClInclude Include="..\..\..\..\src\regal\RegalInit.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalLog.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalLookup.h" />
+ <ClInclude Include="..\..\..\..\src\regal\RegalMarker.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalObj.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalPrivate.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalToken.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalUtil.h" />
<ClInclude Include="..\..\..\..\src\regal\RegalVao.h" />
</ItemGroup>
<ItemGroup>
+ <ClCompile Include="..\..\..\..\src\md5\src\md5.c" />
<ClCompile Include="..\..\..\..\src\mongoose\mongoose.c" />
<ClCompile Include="..\..\..\..\src\regal\Regal.cpp" />
<ClCompile Include="..\..\..\..\src\regal\RegalConfig.cpp" />
@@ -159,6 +161,7 @@
<ClCompile Include="..\..\..\..\src\regal\RegalInit.cpp" />
<ClCompile Include="..\..\..\..\src\regal\RegalLog.cpp" />
<ClCompile Include="..\..\..\..\src\regal\RegalLookup.cpp" />
+ <ClCompile Include="..\..\..\..\src\regal\RegalMarker.cpp" />
<ClCompile Include="..\..\..\..\src\regal\RegalToken.cpp" />
<ClCompile Include="..\..\..\..\src\regal\RegalUtil.cpp" />
</ItemGroup>
View
@@ -0,0 +1,20 @@
+#!/usr/bin/python -B
+
+#
+# Filter calls that don't exist for ES 2.0
+#
+# This is the last layer of the emulation dispatch.
+#
+
+formulae = {
+ 'glClientActiveTexture' : {
+ 'entries' : [ 'glClientActiveTexture' ],
+ 'impl' : [
+ '#if REGAL_FORCE_ES2_PROFILE',

This comment has been minimized.

Show comment
Hide comment
@kmixter

kmixter Oct 1, 2012

Contributor

When this is true isn't _context->info->gles always set?

@kmixter

kmixter Oct 1, 2012

Contributor

When this is true isn't _context->info->gles always set?

+ 'return;',
+ '#else',
+ 'if (_context->info->gles)',
+ ' return;',
+ '#endif' ]
+ }
+}
@@ -24,6 +24,7 @@
from EmuIff import iffFormulae
from EmuBin import binFormulae
from EmuObj import objFormulae
+from EmuFilter import formulae as filterFormulae
# Regal.cpp emulation
@@ -43,14 +44,15 @@
# RegalDispathEmu.cpp fixed-function emulation
emu = [
- { 'type' : 'RegalObj', 'member' : 'obj', 'conditional' : 'Config::enableEmuObj', 'ifdef' : 'REGAL_EMU_OBJ', 'formulae' : objFormulae },
- #{ 'type' : 'RegalPpc', 'member' : 'ppc', 'conditional' : None, 'ifdef' : '', 'formulae' : ppcFormulae },
- { 'type' : 'RegalPpa', 'member' : 'ppa', 'conditional' : 'Config::enableEmuPpa', 'ifdef' : 'REGAL_EMU_PPA', 'formulae' : ppaFormulae },
- { 'type' : 'RegalBin', 'member' : 'bin', 'conditional' : 'Config::enableEmuBin', 'ifdef' : 'REGAL_EMU_BIN', 'formulae' : binFormulae },
- { 'type' : 'RegalDsa', 'member' : 'dsa', 'conditional' : 'Config::enableEmuDsa', 'ifdef' : 'REGAL_EMU_DSA', 'formulae' : dsaFormulae },
- { 'type' : 'RegalIff', 'member' : 'iff', 'conditional' : 'Config::enableEmuIff', 'ifdef' : 'REGAL_EMU_IFF', 'formulae' : iffFormulae },
- { 'type' : 'RegalVao', 'member' : 'vao', 'conditional' : 'Config::enableEmuVao', 'ifdef' : 'REGAL_EMU_VAO', 'formulae' : vaoFormulae },
- { 'type' : 'void', 'member' : None, 'conditional' : None, 'ifdef' : None, 'formulae' : None }
+ { 'type' : 'RegalObj', 'member' : 'obj', 'conditional' : 'Config::enableEmuObj', 'ifdef' : 'REGAL_EMU_OBJ', 'formulae' : objFormulae },
+ #{ 'type' : 'RegalPpc', 'member' : 'ppc', 'conditional' : None, 'ifdef' : '', 'formulae' : ppcFormulae },
+ { 'type' : 'RegalPpa', 'member' : 'ppa', 'conditional' : 'Config::enableEmuPpa', 'ifdef' : 'REGAL_EMU_PPA', 'formulae' : ppaFormulae },
+ { 'type' : 'RegalBin', 'member' : 'bin', 'conditional' : 'Config::enableEmuBin', 'ifdef' : 'REGAL_EMU_BIN', 'formulae' : binFormulae },
+ { 'type' : 'RegalDsa', 'member' : 'dsa', 'conditional' : 'Config::enableEmuDsa', 'ifdef' : 'REGAL_EMU_DSA', 'formulae' : dsaFormulae },
+ { 'type' : 'RegalIff', 'member' : 'iff', 'conditional' : 'Config::enableEmuIff', 'ifdef' : 'REGAL_EMU_IFF', 'formulae' : iffFormulae },
+ { 'type' : 'RegalVao', 'member' : 'vao', 'conditional' : 'Config::enableEmuVao', 'ifdef' : 'REGAL_EMU_VAO', 'formulae' : vaoFormulae },
+ { 'type' : None, 'member' : None, 'conditional' : 'Config::enableEmuFilter', 'ifdef' : 'REGAL_EMU_FILTER', 'formulae' : filterFormulae },
+ { 'type' : 'void', 'member' : None, 'conditional' : None, 'ifdef' : None, 'formulae' : None }
]
contextHeaderTemplate = Template( '''${AUTOGENERATED}
@@ -296,10 +298,12 @@ def generateContextSource(apis, args):
# init += '#endif\n'
init += '%s = new %s;\n' % ( emu[revi]['member'], emu[revi]['type'] )
- init += '%s->emuLevel = %d;\n' % ( emu[revi]['member'], emu[revi]['level'] )
- init += '%s->Init( this );\n' % emu[revi]['member']
+ init += 'emuLevel = %d;\n' % ( int(emu[revi]['level']) - 1)
+ init += '%s->Init(*this);\n' % emu[revi]['member']
emuMemberInit += indent(wrapIf(emu[revi]['ifdef'],wrapCIf(emu[revi]['conditional'],init)),' ')
+ emuMemberInit += ' emuLevel = %d;\n' % ( len( emu ) - 1 )
+
# Output
substitute = {}
@@ -119,9 +119,10 @@ def apiEmuFuncDefineCode(apis, args):
if e != None and 'prefix' in e and len(e['prefix']):
if l['member'] :
code += ' if (_context->%s) {\n' % l['member']
- code += ' RegalEmuScopedActivate activate( _context, _context->%s );\n' % l['member']
+ code += ' Push<int> pushLevel(_context->emuLevel);\n'
+ code += ' _context->emuLevel = %d;\n' %( int(l['level']) - 1 )
for j in e['prefix'] :
- code += ' %s\n' % j
+ code += ' %s\n' % j
if l['member'] :
code += ' }\n'
if e!= None and 'impl' in e and l['member']:
@@ -155,12 +156,13 @@ def apiEmuFuncDefineCode(apis, args):
if e != None and 'impl' in e and len(e['impl']):
if l['member'] :
code += ' if (_context->%s) {\n' % l['member']
- code += ' RegalEmuScopedActivate activate( _context, _context->%s );\n' % l['member']
+ code += ' Push<int> pushLevel(_context->emuLevel);\n'
+ code += ' _context->emuLevel = %d;\n' %( int(l['level']) - 1 )
for j in e['impl'] :
- code += ' %s\n' % j
+ code += ' %s\n' % j
if l['member'] :
if typeIsVoid(rType):
- code += ' return;\n'
+ code += ' return;\n'
code += ' }\n'
if l['ifdef']:
code += ' #endif\n'
View
@@ -19,8 +19,9 @@
prototypes) to maintain the tradition that Netfone will compile
with Sun's original "cc". */
-#include <memory.h> /* for memcpy() */
-#include <string.h> /* for memcpy() */
+#include <memory.h> /* for memcpy() */
+#include <string.h> /* for memcpy() */
+
#include "md5.h"
#ifndef HIGHFIRST
Oops, something went wrong.

0 comments on commit 994fa02

Please sign in to comment.