@@ -53,7 +53,7 @@ static inline void trace(char *fmt, ...)
53
53
va_list ap ;
54
54
char buf [4096 ];
55
55
56
- snprintf (buf , sizeof (buf ), "T=%08x " , GetCurrentThreadId ());
56
+ snprintf (buf , sizeof (buf ), "T=%08lx " , GetCurrentThreadId ());
57
57
OutputDebugString (buf );
58
58
59
59
va_start (ap , fmt );
@@ -70,7 +70,7 @@ static inline void trace(char *fmt, ...)
70
70
if (COMG(rshutdown_started)) { \
71
71
trace(" PHP Object:%p (name:unknown) %s\n", Z_OBJ(disp->object), methname); \
72
72
} else { \
73
- trace(" PHP Object:%p (name:%s) %s\n", Z_OBJ(disp->object), Z_OBJCE(disp->object)->name->val , methname); \
73
+ trace(" PHP Object:%p (name:%s) %s\n", Z_OBJ(disp->object), ZSTR_VAL( Z_OBJCE(disp->object)->name) , methname); \
74
74
} \
75
75
if (GetCurrentThreadId() != disp->engine_thread) { \
76
76
return RPC_E_WRONG_THREAD; \
@@ -109,7 +109,7 @@ static ULONG STDMETHODCALLTYPE disp_release(IDispatchEx *This)
109
109
FETCH_DISP ("Release" );
110
110
111
111
ret = InterlockedDecrement (& disp -> refcount );
112
- trace ("-- refcount now %d \n" , ret );
112
+ trace ("-- refcount now %lu \n" , ret );
113
113
if (ret == 0 ) {
114
114
/* destroy it */
115
115
disp_destructor (disp );
@@ -201,7 +201,7 @@ static HRESULT STDMETHODCALLTYPE disp_getdispid(
201
201
202
202
name = php_com_olestring_to_string (bstrName , COMG (code_page ));
203
203
204
- trace ("Looking for %s, namelen=%d in %p\n" , ZSTR_VAL (name ), ZSTR_LEN (name ), disp -> name_to_dispid );
204
+ trace ("Looking for %s, namelen=%lu in %p\n" , ZSTR_VAL (name ), ZSTR_LEN (name ), disp -> name_to_dispid );
205
205
206
206
/* Lookup the name in the hash */
207
207
if ((tmp = zend_hash_find (disp -> name_to_dispid , name )) != NULL ) {
@@ -235,7 +235,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
235
235
if (NULL != (name = zend_hash_index_find (disp -> dispid_to_name , id ))) {
236
236
/* TODO: add support for overloaded objects */
237
237
238
- trace ("-- Invoke: %d %20s [%d ] flags=%08x args=%d \n" , id , Z_STRVAL_P (name ), Z_STRLEN_P (name ), wFlags , pdp -> cArgs );
238
+ trace ("-- Invoke: %ld %20s [%lu ] flags=%08x args=%u \n" , id , Z_STRVAL_P (name ), Z_STRLEN_P (name ), wFlags , pdp -> cArgs );
239
239
240
240
/* convert args into zvals.
241
241
* Args are in reverse order */
@@ -246,7 +246,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
246
246
247
247
arg = & pdp -> rgvarg [ pdp -> cArgs - 1 - i ];
248
248
249
- trace ("alloc zval for arg %d VT=%08x\n" , i , V_VT (arg ));
249
+ trace ("alloc zval for arg %u VT=%08x\n" , i , V_VT (arg ));
250
250
251
251
php_com_wrap_variant (& params [i ], arg , COMG (code_page ));
252
252
}
@@ -275,7 +275,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
275
275
VARIANT * srcvar = & obj -> v ;
276
276
VARIANT * dstvar = & pdp -> rgvarg [ pdp -> cArgs - 1 - i ];
277
277
if ((V_VT (dstvar ) & VT_BYREF ) && obj -> modified ) {
278
- trace ("percolate modified value for arg %d VT=%08x\n" , i , V_VT (dstvar ));
278
+ trace ("percolate modified value for arg %u VT=%08x\n" , i , V_VT (dstvar ));
279
279
php_com_copy_variant (dstvar , srcvar );
280
280
}
281
281
}
@@ -311,7 +311,7 @@ static HRESULT STDMETHODCALLTYPE disp_invokeex(
311
311
}
312
312
313
313
} else {
314
- trace ("InvokeEx: I don't support DISPID=%d \n" , id );
314
+ trace ("InvokeEx: I don't support DISPID=%ld \n" , id );
315
315
}
316
316
317
317
return ret ;
@@ -508,7 +508,7 @@ static php_dispatchex *disp_constructor(zval *object)
508
508
{
509
509
php_dispatchex * disp = (php_dispatchex * )CoTaskMemAlloc (sizeof (php_dispatchex ));
510
510
511
- trace ("constructing a COM wrapper for PHP object %p (%s)\n" , object , Z_OBJCE_P (object )-> name );
511
+ trace ("constructing a COM wrapper for PHP object %p (%s)\n" , object , ZSTR_VAL ( Z_OBJCE_P (object )-> name ) );
512
512
513
513
if (disp == NULL )
514
514
return NULL ;
0 commit comments