cvs: php4 /ext/dotnet dotnet.cpp
| From: | Harald Radi | Date: | Tue, 07 Aug 2001 17:18:19 +0000 |
| Subject: | cvs: php4 /ext/dotnet dotnet.cpp | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-6627@lists.php.net to get a copy of this message | ||
phanto Tue Aug 7 13:18:19 2001 EDT
Modified files:
/php4/ext/dotnet dotnet.cpp
Log:
TSRM fix
Index: php4/ext/dotnet/dotnet.cpp
diff -u php4/ext/dotnet/dotnet.cpp:1.13 php4/ext/dotnet/dotnet.cpp:1.14
--- php4/ext/dotnet/dotnet.cpp:1.13 Tue Jul 31 00:53:47 2001
+++ php4/ext/dotnet/dotnet.cpp Tue Aug 7 13:18:19 2001
@@ -34,15 +34,15 @@
#include <math.h>
#include <comdef.h>
-extern "C" { /* this should be included in the includes itself !! */
-
+extern "C"
+{
#include "php.h"
#include "ext/standard/info.h"
-
}
-#include "../com/conversion.h"
-#include "../com/php_COM.h"
+#include "ext/com/conversion.h"
+#include "ext/com/php_COM.h"
+
#include "Mscoree.h"
#include "mscorlib.h"
@@ -76,7 +76,7 @@
return ERROR_SUCCESS;
}
-HRESULT dotnet_create(OLECHAR *assembly, OLECHAR *datatype, comval *obj) {
+HRESULT dotnet_create(OLECHAR *assembly, OLECHAR *datatype, comval *obj TSRMLS_DC) {
HRESULT hr;
_ObjectHandle *pHandle;
@@ -89,7 +89,7 @@
pHandle->Release();
if (FAILED(hr)) return hr;
- php_COM_set(obj, unwrapped.pdispVal, TRUE);
+ php_COM_set(obj, &unwrapped.pdispVal, TRUE TSRMLS_CC);
return ERROR_SUCCESS;
}
@@ -129,20 +129,20 @@
}
convert_to_string(assembly_name);
- assembly = php_char_to_OLECHAR(Z_STRVAL_P(assembly_name), Z_STRLEN_P(assembly_name), codepage);
+ assembly = php_char_to_OLECHAR(Z_STRVAL_P(assembly_name), Z_STRLEN_P(assembly_name), codepage
TSRMLS_CC);
convert_to_string(datatype_name);
- datatype = php_char_to_OLECHAR(Z_STRVAL_P(datatype_name), Z_STRLEN_P(datatype_name), codepage);
+ datatype = php_char_to_OLECHAR(Z_STRVAL_P(datatype_name), Z_STRLEN_P(datatype_name), codepage
TSRMLS_CC);
ALLOC_COM(obj);
/* obtain IDispatch */
- hr = dotnet_create(assembly, datatype, obj);
+ hr = dotnet_create(assembly, datatype, obj TSRMLS_CC);
efree(assembly);
efree(datatype);
if (FAILED(hr)) {
char *error_message;
- error_message = php_COM_error_message(hr);
+ error_message = php_COM_error_message(hr TSRMLS_CC);
php_error(E_WARNING,"Error obtaining .Net class for %s in assembly %s:
%s",datatype_name->value.str.val,assembly_name->value.str.val,error_message);
LocalFree(error_message);
efree(obj);
@@ -169,8 +169,8 @@
pval *object_handle;
PHP_FN(dotnet_load)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
- if (!zend_is_true(return_value)) {
- var_reset(object);
+ if (!Z_LVAL_P(return_value)) {
+ ZVAL_FALSE(object);
return;
}
ALLOC_ZVAL(object_handle);