summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-05-03 19:01:16 +0000
committerMark Spruiell <mes@zeroc.com>2005-05-03 19:01:16 +0000
commitaf4b6eaef9b78d0bd01e935ba8018ed559ad3abf (patch)
treef0acbbf7e636e32aa52d07d1635a7eb53d954fe3 /php/src
parentMerging fixes from R2_1_branch (diff)
downloadice-af4b6eaef9b78d0bd01e935ba8018ed559ad3abf.tar.bz2
ice-af4b6eaef9b78d0bd01e935ba8018ed559ad3abf.tar.xz
ice-af4b6eaef9b78d0bd01e935ba8018ed559ad3abf.zip
bug fixes for ZTS & php_error_docref
Diffstat (limited to 'php/src')
-rw-r--r--php/src/ice/profile.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/php/src/ice/profile.cpp b/php/src/ice/profile.cpp
index 3d5440f7c8a..21516a72c19 100644
--- a/php/src/ice/profile.cpp
+++ b/php/src/ice/profile.cpp
@@ -42,7 +42,7 @@ namespace IcePHP
class CodeVisitor : public Slice::ParserVisitor
{
public:
- CodeVisitor(ostream&, Profile::ClassMap&);
+ CodeVisitor(ostream&, Profile::ClassMap& TSRMLS_DC);
virtual void visitClassDecl(const Slice::ClassDeclPtr&);
virtual bool visitClassDefStart(const Slice::ClassDefPtr&);
@@ -62,6 +62,9 @@ private:
ostream& _out;
Profile::ClassMap& _classes;
+#ifdef ZTS
+ TSRMLS_D;
+#endif
};
} // End of namespace IcePHP
@@ -255,7 +258,7 @@ static const char* _coreTypes =
// Parse the Slice files that define the types and operations available to a PHP script.
//
static bool
-parseSlice(const string& argStr, Slice::UnitPtr& unit)
+parseSlice(const string& argStr, Slice::UnitPtr& unit TSRMLS_DC)
{
vector<string> args;
try
@@ -361,7 +364,7 @@ parseSlice(const string& argStr, Slice::UnitPtr& unit)
}
static bool
-createProfile(const string& name, const string& config, const string& options, const string& slice)
+createProfile(const string& name, const string& config, const string& options, const string& slice TSRMLS_DC)
{
map<string, Profile*>::iterator p = _profiles.find(name);
if(p != _profiles.end())
@@ -407,7 +410,7 @@ createProfile(const string& name, const string& config, const string& options, c
Slice::UnitPtr unit;
if(!slice.empty())
{
- if(!parseSlice(slice, unit))
+ if(!parseSlice(slice, unit TSRMLS_CC))
{
return false;
}
@@ -454,7 +457,7 @@ createProfile(const string& name, const string& config, const string& options, c
//
ostringstream out;
Profile::ClassMap classes;
- CodeVisitor visitor(out, classes);
+ CodeVisitor visitor(out, classes TSRMLS_CC);
unit->visit(&visitor, false);
Profile* profile = new Profile;
@@ -481,7 +484,7 @@ IcePHP::profileInit(TSRMLS_D)
const char* profiles = INI_STR("ice.profiles");
const char* slice = INI_STR("ice.slice");
- if(!createProfile(_defaultProfileName, config, options, slice))
+ if(!createProfile(_defaultProfileName, config, options, slice TSRMLS_CC))
{
return false;
}
@@ -542,7 +545,7 @@ IcePHP::profileInit(TSRMLS_D)
if(!currentName.empty())
{
- if(!createProfile(currentName, currentConfig, currentOptions, currentSlice))
+ if(!createProfile(currentName, currentConfig, currentOptions, currentSlice TSRMLS_CC))
{
return false;
}
@@ -605,7 +608,7 @@ IcePHP::profileInit(TSRMLS_D)
}
}
- if(!currentName.empty() && !createProfile(currentName, currentConfig, currentOptions, currentSlice))
+ if(!currentName.empty() && !createProfile(currentName, currentConfig, currentOptions, currentSlice TSRMLS_CC))
{
return false;
}
@@ -794,9 +797,12 @@ ZEND_FUNCTION(Ice_dumpProfile)
PUTS(s.c_str());
}
-IcePHP::CodeVisitor::CodeVisitor(ostream& out, map<string, Slice::ClassDefPtr>& classes) :
+IcePHP::CodeVisitor::CodeVisitor(ostream& out, map<string, Slice::ClassDefPtr>& classes TSRMLS_DC) :
_out(out), _classes(classes)
{
+#ifdef ZTS
+ this->TSRMLS_C = TSRMLS_C;
+#endif
}
void