id tmp;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if ((tmp = [self application]))
- [ms appendFormat:@" app=%@(0x%08X)", [(WOApplication *)tmp name], tmp];
+ [ms appendFormat:@" app=%@(0x%p)", [(WOApplication *)tmp name], tmp];
if ((tmp = [self requestHandler]))
[ms appendFormat:@" rqh=%@", tmp];
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@" appAlias=%@", self->appAlias];
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@" uri=%@", [[self request] uri]];
[ms appendString:@">"];
return ms;
if ((cstr = JS_GetStringBytes(_jss)))
return [(NSString *)self initWithCString:cstr];
- NSLog(@"ERROR(%s): did not get bytes of JS string 0x%08X !",
+ NSLog(@"ERROR(%s): did not get bytes of JS string 0x%p !",
__PRETTY_FUNCTION__, _jss);
[self release];
return nil;
jso_ObjectMap *emap;
#if LOG_OBJECT_OPS
- NSLog(@"new map: cx=0x%08X, nrefs=%i, ops=0x%08X, class=0x%08X, obj=0x%08X",
+ NSLog(@"new map: cx=0x%p, nrefs=%i, ops=0x%p, class=0x%p, obj=0x%p",
cx, nrefs, ops, clasp, obj);
#endif
[self->rt release];
[super dealloc];
- if (debugDealloc) NSLog(@"did dealloc context: 0x%08X", self);
+ if (debugDealloc) NSLog(@"did dealloc context: 0x%p", self);
}
- (BOOL)loadStandardClasses {
- (NSString *)description {
return [NSString stringWithFormat:
- @"<%@[0x%08X]: %@%@handle=0x%08X version=%i runtime=%@>",
+ @"<%@[0x%p]: %@%@handle=0x%p version=%i runtime=%@>",
NSStringFromClass([self class]), self,
[self isRunning] ? @"running " : @"",
[self isConstructing] ? @"constructing " : @"",
NSMutableString *ms = [NSMutableString stringWithCapacity:64];
id tmp;
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if (self->cx)
- [ms appendFormat:@" cx=0x%08X", self->cx];
+ [ms appendFormat:@" cx=0x%p", self->cx];
else
[ms appendString:@" no-cx"];
srcname = [_source cString];
#if 0
- NSLog(@"%s:%i eval script on objc=0x%08X js=0x%08X cx=0x%08X",
+ NSLog(@"%s:%i eval script on objc=0x%p js=0x%p cx=0x%p",
[_source cString], _line,
_object, jso, cx);
#endif
JSBool ret;
if (NGJavaScriptBridge_LOG_PROP_DEFINITION) {
- NSLog(@"%s: definition of %@ property '%@' on j0x%08X",
+ NSLog(@"%s: definition of %@ property '%@' on j0x%p",
__PRETTY_FUNCTION__, _ro ? @"ro/noslot" : @"rw/noslot",
mname, _jso);
}
if ((fspecs = [self functionSpecs])) {
if (!JS_DefineFunctions(_cx, _jso, fspecs)) {
- NSLog(@"ERROR(%s): couldn't define static JS functions (0x%08X) on "
- @"JSObject 0x%08X in JSContext 0x%08X ..",
+ NSLog(@"ERROR(%s): couldn't define static JS functions (0x%p) on "
+ @"JSObject 0x%p in JSContext 0x%p ..",
__PRETTY_FUNCTION__, fspecs, _jso, _cx);
return NO;
}
onObject:_jso inJSContext:_cx];
if (!ret) {
NSLog(@"ERROR(%s): couldn't define property '%@' on "
- @"JSObject 0x%08X in JSContext 0x%08X",
+ @"JSObject 0x%p in JSContext 0x%p",
__PRETTY_FUNCTION__, mname, _jso, _cx);
continue;
}
- (void)dealloc {
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"%s: dealloc o0x%08X j0x%08X ctx=0x%08X jcx=0x%08X",
+ NSLog(@"%s: dealloc o0x%p j0x%p ctx=0x%p jcx=0x%p",
__PRETTY_FUNCTION__, self, self->handle,
self->ctx, self->jscx);
}
if (val == JSVAL_VOID) {
/* property is not defined */
#if 0
- NSLog(@"%s: got void for key '%s' o0x%08X j0x%08X",
+ NSLog(@"%s: got void for key '%s' o0x%p j0x%p",
__PRETTY_FUNCTION__,
ckey, self, self->handle);
#endif
id tmp;
ms = [NSMutableString stringWithCapacity:32];
- [ms appendFormat:@"<%@[0x%08X]: handle=0x%08X>",
+ [ms appendFormat:@"<%@[0x%p]: handle=0x%p>",
NSStringFromClass([self class]), self,
[self handle]];
if ((tmp = [self javaScriptClassName]))
- (NSString *)description {
return [NSString stringWithFormat:
- @"<0x%08X[%@]: len=%d>",
+ @"<0x%p[%@]: len=%d>",
self, NSStringFromClass([self class]),
self->idArray ? self->idArray->length : 0];
}
*/
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"%s: dealloc 0x%08X<%@> at 0x%08X on j0x%08X",
+ NSLog(@"%s: dealloc 0x%p<%@> at 0x%p on j0x%p",
__PRETTY_FUNCTION__,
self, NSStringFromClass([self class]),
self->managedObject,
priv = JS_GetPrivate(cx, self->jsObject);
if (priv == self) {
- NSLog(@"ERROR(%s): object handler 0x%08X still has a private ???",
+ NSLog(@"ERROR(%s): object handler 0x%p still has a private ???",
__PRETTY_FUNCTION__, self);
JS_SetPrivate(cx, self->jsObject, NULL);
}
}
else {
if (self->jsRootRC > 0) {
- NSLog(@"WARNING(%s): jsRootRc > 0, but jsObject is missing 0x%08X",
+ NSLog(@"WARNING(%s): jsRootRc > 0, but jsObject is missing 0x%p",
__PRETTY_FUNCTION__, self);
}
}
/* WATCH OUT: leaks memory ! */
char *buf;
buf = malloc(32);
- sprintf(buf, "ObjC:0x%08X", (unsigned)self);
+ sprintf(buf, "ObjC:0x%p", (unsigned)self);
return buf;
#else
return "ObjC root";
else
cname = "<no class>";
- printf("%s: cx=0x%08X, obj=0x%08X<%s>, argc=%d\n",
+ printf("%s: cx=0x%p, obj=0x%p<%s>, argc=%d\n",
__PRETTY_FUNCTION__,
cx, obj, cname, argc);
}
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:256];
- [ms appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self];
- [ms appendFormat:@" handle=0x%08X", [self handle]];
+ [ms appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self];
+ [ms appendFormat:@" handle=0x%p", [self handle]];
[ms appendFormat:@" class=%@", [self javaScriptClassName]];
[ms appendFormat:@" parent=%@", [self parentObject]];
[ms appendString:@">"];
return JS_PropertyStub(cx, obj, _id, vp);
NSCAssert2(self->managedObject,
- @"missing managed object (handler=%@, j0x%08X) !",
+ @"missing managed object (handler=%@, j0x%p) !",
self, obj);
if (JSVAL_IS_INT(_id)) {
case NGPropOp_add: {
if (NGJavaScriptBridge_LOG_PROP_ADD) {
NSLog(@"JS: add by name '%@' type %s "
- @"j0x%08X o0x%08X<%@> on o0x%08X<%@>",
+ @"j0x%p o0x%p<%@> on o0x%p<%@>",
name, JS_GetTypeName(cx, JS_TypeOfValue(cx, *vp)),
obj, self, NSStringFromClass([self class]),
self->managedObject,
if (NGJavaScriptBridge_LOG_PROP_GET) {
NSLog(@"JS: get by name '%@' type %s "
- @"j0x%08X o0x%08X<%@> on o0x%08X<%@>",
+ @"j0x%p o0x%p<%@> on o0x%p<%@>",
name, JS_GetTypeName(cx, JS_TypeOfValue(cx, *vp)),
obj, self, NSStringFromClass([self class]),
self->managedObject,
v = [self->managedObject valueForJSPropertyNamed:name];
if (NGJavaScriptBridge_LOG_PROP_GET) {
- NSLog(@" return value o0x%08X<%@>",
+ NSLog(@" return value o0x%p<%@>",
v, NSStringFromClass([v class]));
}
if (NGJavaScriptBridge_LOG_PROP_SET) {
NSLog(@"JSObjectHandler: set by name '%@' type %s "
- @"j0x%08X o0x%08X<%@> on o0x%08X<%@>",
+ @"j0x%p o0x%p<%@> on o0x%p<%@>",
name, JS_GetTypeName(cx, JS_TypeOfValue(cx, *vp)),
obj, self, NSStringFromClass([self class]),
self->managedObject,
NSCAssert(self->managedObject, @"missing managed object !");
if (NGJavaScriptBridge_TRACK_FINALIZATION) {
- NSLog(@"finalizing j0x%08X o0x%08X<%@>",
+ NSLog(@"finalizing j0x%p o0x%p<%@>",
obj,
self->managedObject,
NSStringFromClass([self->managedObject class]));
id parent;
if (logHandleForObject)
- NSLog(@"-proxyForObject:0x%08X %@", _object, _object);
+ NSLog(@"-proxyForObject:0x%p %@", _object, _object);
if (_object == nil) {
jso = JSVAL_TO_OBJECT(JSVAL_NULL);
- if (logHandleForObject) NSLog(@" => is nil: 0x%08X", jso);
+ if (logHandleForObject) NSLog(@" => is nil: 0x%p", jso);
return jso;
}
if ([_object respondsToSelector:@selector(_jsHandleInMapContext:)]) {
jso = [_object _jsHandleInMapContext:self];
if (logHandleForObject) {
- NSLog(@" obj (class %@) handles itself: 0x%08X",
+ NSLog(@" obj (class %@) handles itself: 0x%p",
NSStringFromClass([_object class]), jso);
}
return jso;
if ((jso = NSMapGet(self->objcToJS, _object))) {
/* a proxy is already registered */
- if (logHandleForObject) NSLog(@" proxy already registered: 0x%08X", jso);
+ if (logHandleForObject) NSLog(@" proxy already registered: 0x%p", jso);
return jso;
}
if ((combinedObjInfo = NSMapGet(combinedToInfo, _object))) {
/* check for correct context */
if (combinedObjInfo->ctx != self) {
- NSLog(@"%s: tried to access combined object 0x%08X<%@> in "
- @"different mapping context (ctx=0x%08X, required=0x%08X) !",
+ NSLog(@"%s: tried to access combined object 0x%p<%@> in "
+ @"different mapping context (ctx=0x%p, required=0x%p) !",
__PRETTY_FUNCTION__, _object, NSStringFromClass([_object class]),
self, combinedObjInfo->ctx);
return nil;
}
- if (logHandleForObject) NSLog(@" proxy is combined object: 0x%08X", jso);
+ if (logHandleForObject) NSLog(@" proxy is combined object: 0x%p", jso);
return combinedObjInfo->jso;
}
/* register proxy */
#if DEBUG
NSAssert1(NSMapGet(self->objcToJS, _object) == NULL,
- @"already registered a proxy for object o0x%08X", _object);
+ @"already registered a proxy for object o0x%p", _object);
#endif
- if (logHandleForObject) NSLog(@" register handle 0x%08X ...", jso);
+ if (logHandleForObject) NSLog(@" register handle 0x%p ...", jso);
NSMapInsertKnownAbsent(self->objcToJS, _object, jso);
}
else {
JSBool res;
if (logHandleForObject)
- NSLog(@"register parent 0x%08X for object .."), parent;
+ NSLog(@"register parent 0x%p for object .."), parent;
pjso = [self handleForObject:parent];
return nil;
if ((handleClass = JS_GetClass(_handle)) == NULL) {
- NSLog(@"couldn't get class of handle 0x%08X", (unsigned)_handle);
+ NSLog(@"couldn't get class of handle 0x%p", (unsigned)_handle);
return nil;
}
NGJavaScriptObjectHandler *h;
if ((h = JS_GetPrivate([self->jsContext handle], _handle)) == nil) {
- NSLog(@"couldn't get private of JS object 0x%08X "
+ NSLog(@"couldn't get private of JS object 0x%p "
@"(NGJavaScriptObjectHandler)", _handle);
return nil;
}
NGJavaScriptShadow *h;
if ((h = JS_GetPrivate([self->jsContext handle], _handle)) == nil) {
- NSLog(@"couldn't get private of JS shadow object 0x%08X "
+ NSLog(@"couldn't get private of JS shadow object 0x%p "
@"(NGJavaScriptShadow)", _handle);
return nil;
}
if ((combinedObjInfo = NSMapGet(combinedToInfo, _object))) {
if (combinedObjInfo->ctx != self) {
- NSLog(@"forget combined object 0x%08X in wrong context !", _object);
+ NSLog(@"forget combined object 0x%p in wrong context !", _object);
}
else
[self _jsFinalizeCombinedObject:_object];
JSObject *jso;
jso = NSMapGet(self->objcToJS, _object);
- NSLog(@"forgetting non-combined object o0x%08X<%@> j0x%08X rc %d",
+ NSLog(@"forgetting non-combined object o0x%p<%@> j0x%p rc %d",
_object, NSStringFromClass([_object class]),
jso,
[_object retainCount]);
JSObject *jso;
if ((jso = [self handleForObject:_object]) == NULL) {
- NSLog(@"did not find handle for object 0x%08X", _object);
+ NSLog(@"did not find handle for object 0x%p", _object);
return nil;
}
while (NSNextMapEnumeratorPair(&e, (void*)&jso, (void*)&proxy)) {
jsClass = jso ? JS_GetClass(jso) : NULL;
- printf(" 0x%08X %-20s 0x%08X %-26s %2d\n",
+ printf(" 0x%p %-20s 0x%p %-26s %2d\n",
(unsigned)jso,
jsClass ? jsClass->name : "<null>",
(unsigned)proxy,
jsClass = jsProxy ? JS_GetClass(jsProxy) : NULL;
- printf(" 0x%08X %-20s 0x%08X %-26s %2d\n",
+ printf(" 0x%p %-20s 0x%p %-26s %2d\n",
(unsigned)object,
[NSStringFromClass([object class]) cString],
(unsigned)jsProxy,
if ([_obj respondsToSelector:@selector(_jsGetValue:inJSContext:)]) {
if (logValueConversion) {
- NSLog(@"%s(0x%08X, 0x%08X<%@>) => own handling ..",
+ NSLog(@"%s(0x%p, 0x%p<%@>) => own handling ..",
__PRETTY_FUNCTION__,
_value, _obj, NSStringFromClass([_obj class]));
}
JSObject *jso;
if (logValueConversion) {
- NSLog(@"%s(0x%08X, 0x%08X<%@>) => get handle ..",
+ NSLog(@"%s(0x%p, 0x%p<%@>) => get handle ..",
__PRETTY_FUNCTION__,
_value, _obj, NSStringFromClass([_obj class]));
}
}
else {
if (logValueConversion) {
- NSLog(@"%s(0x%08X, 0x%08X<%@>) => missing value store ?",
+ NSLog(@"%s(0x%p, 0x%p<%@>) => missing value store ?",
__PRETTY_FUNCTION__,
_value, _obj, NSStringFromClass([_obj class]));
}
NSMapInsertKnownAbsent(combinedToInfo, _object, combinedObjInfo);
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"combine: o0x%08X<%@>->j0x%08X "
- @"(handler=0x%08X, old-rc=%d, new-rc=%d)",
+ NSLog(@"combine: o0x%p<%@>->j0x%p "
+ @"(handler=0x%p, old-rc=%d, new-rc=%d)",
_object, NSStringFromClass([_object class]),
combinedObjInfo->jso, combinedObjInfo->handler, oldRC, [_object retainCount]);
}
"h#");
e = NSEnumerateMapTable(combinedToInfo);
while (NSNextMapEnumeratorPair(&e, (void*)&object, (void*)&combinedObjInfo)) {
- printf(" 0x%08X %-16s %2d 0x%08X 0x%08X 0x%08X %2d %2d\n",
+ printf(" 0x%p %-16s %2d 0x%p 0x%p 0x%p %2d %2d\n",
(unsigned)object, [NSStringFromClass([object class]) cString],
[object retainCount],
(unsigned)combinedObjInfo->jso,
}
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"FREEING COMBINED OBJECT o%08X<%@>-j%08X (handler 0x%08X).",
+ NSLog(@"FREEING COMBINED OBJECT o%p<%@>-j%p (handler 0x%p).",
_object, NSStringFromClass([_object class]),
combinedObjInfo->jso, combinedObjInfo->handler);
}
if ((combinedObjInfo = NSMapGet(combinedToInfo, self)) == NULL) {
if (NGJavaScriptBridge_TRACK_NOINFO_MEMORY) {
- NSLog(@"CO: NO INFO retain: o%08X<%@>, rc=%d",
+ NSLog(@"CO: NO INFO retain: o%p<%@>, rc=%d",
self, NSStringFromClass([self class]), [self retainCount]);
}
return [super retain];
if (combinedObjInfo->handler == nil) {
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"CO: NO HANDLER retain: o%08X<%@>-j0x%08X, rc=%d",
+ NSLog(@"CO: NO HANDLER retain: o%p<%@>-j0x%p, rc=%d",
self, NSStringFromClass([self class]),
combinedObjInfo->jso, [self retainCount]);
}
combinedObjInfo->rc++;
if (NGJavaScriptBridge_TRACK_MEMORY_RC) {
- NSLog(@"CO: retain: o%08X<%@>-j%08X (handler=0x%08X), rc=%d, root-rc=%d",
+ NSLog(@"CO: retain: o%p<%@>-j%p (handler=0x%p), rc=%d, root-rc=%d",
self, NSStringFromClass([self class]), combinedObjInfo->jso, combinedObjInfo->handler,
combinedObjInfo->rc, [combinedObjInfo->handler jsRootRetainCount]);
}
if ((combinedObjInfo = NSMapGet(combinedToInfo, self)) == NULL) {
if (NGJavaScriptBridge_TRACK_NOINFO_MEMORY)
- NSLog(@"CO: NO INFO release: o%08X, rc=%d", self, [self retainCount]);
+ NSLog(@"CO: NO INFO release: o%p, rc=%d", self, [self retainCount]);
[super release];
return;
if (combinedObjInfo->handler == nil) {
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"CO: NO HANDLER release: o%08X<%@>-j0x%08X, rc=%d",
+ NSLog(@"CO: NO HANDLER release: o%p<%@>-j0x%p, rc=%d",
self, NSStringFromClass([self class]),
combinedObjInfo->jso, [self retainCount]);
}
}
if (NGJavaScriptBridge_TRACK_MEMORY_RC) {
- NSLog(@"CO: release: o%08X<%@>-j%08X (handler=0x%08X), rc=%d, root-rc=%d",
+ NSLog(@"CO: release: o%p<%@>-j%p (handler=0x%p), rc=%d, root-rc=%d",
self, NSStringFromClass([self class]), combinedObjInfo->jso, combinedObjInfo->handler,
[self retainCount], [combinedObjInfo->handler jsRootRetainCount]);
}
NSAssert1(combinedObjInfo->handler,
- @"missing handler for combined object 0x%08X ..", self);
+ @"missing handler for combined object 0x%p ..", self);
/*
combinedObjInfo->rootRef = NO;
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"%s: released last ObjC reference of o%08X-j%08X, %d root-refs ..",
+ NSLog(@"%s: released last ObjC reference of o%p-j%p, %d root-refs ..",
__PRETTY_FUNCTION__,
self, combinedObjInfo->jso, [combinedObjInfo->handler jsRootRetainCount]);
}
__attribute__((unused));
static void rootDumper(const char *name, void *rp, void *data) {
- printf("ROOT: %s rp=0x%08X rt=0x%08X\n", name, (unsigned)rp, (unsigned)data);
+ printf("ROOT: %s rp=0x%p rt=0x%p\n", name, (unsigned)rp, (unsigned)data);
}
- (void)dumpNamedRoots {
- (NSString *)description {
return [NSString stringWithFormat:
- @"<%@[0x%08X]: handle=0x%08X>",
+ @"<%@[0x%p]: handle=0x%p>",
NSStringFromClass([self class]), self,
[self handle]
];
//printf("finalized JS shadow ..\n");
}
else {
- NSLog(@"ERROR(%s): finalizing JS shadow j0x%08X, "
- @"still has a private o0x%08X !!!",
+ NSLog(@"ERROR(%s): finalizing JS shadow j0x%p, "
+ @"still has a private o0x%p !!!",
__PRETTY_FUNCTION__, obj, self);
}
}
- (void)dealloc {
if (NGJavaScriptBridge_TRACK_MEMORY) {
- NSLog(@"%s: dealloc shadow o0x%08X j0x%08X ctx=0x%08X jcx=0x%08X",
+ NSLog(@"%s: dealloc shadow o0x%p j0x%p ctx=0x%p jcx=0x%p",
__PRETTY_FUNCTION__, self, self->handle,
self->ctx, self->jscx);
}
pool = [[NSAutoreleasePool alloc] init];
global = [mapCtx globalObject];
- [self print:@"global is 0x%08X %@", global, global];
+ [self print:@"global is 0x%p %@", global, global];
jobj = [[Blah alloc] init];
- [self print:@" blah: %@ -> j0x%08X", jobj, [mapCtx handleForObject:jobj]];
+ [self print:@" blah: %@ -> j0x%p", jobj, [mapCtx handleForObject:jobj]];
[self print:@" do: MyType()"];
result = [jobj evaluateScript:@"MyType()" language:SLANG];
id global;
global = [mapCtx globalObject];
- NSLog(@"global is 0x%08X %@", global, global);
+ NSLog(@"global is 0x%p %@", global, global);
blah = [[Blah alloc] init];
[global setObject:blah forKey:@"blah"];
jso = NGObjectMapping_GetHandleForObject(blah);
- NSLog(@"obj o0x%08X j0x%08X", blah, jso);
+ NSLog(@"obj o0x%p j0x%p", blah, jso);
for (i = 0; i < 3; i++) {
NSAutoreleasePool *pool;
obj = [[Blah alloc] init];
jso = NGObjectMapping_GetHandleForObject(obj);
- NSLog(@"obj o0x%08X j0x%08X", obj, jso);
+ NSLog(@"obj o0x%p j0x%p", obj, jso);
[obj evaluateScript:testScript2 language:SLANG];
#endif
jobj = [[NGJavaScriptObject alloc] init];
jso = NGObjectMapping_GetHandleForObject(jobj);
- //NSLog(@"obj o0x%08X j0x%08X", jobj, jso);
+ //NSLog(@"obj o0x%p j0x%p", jobj, jso);
#if 0
[[NGObjectMappingContext activeObjectMappingContext]
jso = [[NGObjectMappingContext activeObjectMappingContext]
handleForObject:obj];
- [self print:@"info on o0x%08X j0x%08X", obj, jso];
+ [self print:@"info on o0x%p j0x%p", obj, jso];
[self print:@" description: %@", obj];
e = [obj keyEnumerator];
}
- (void)dealloc {
- NSLog(@"dealloc MyNum: 0x%08X %i", self, self->i);
+ NSLog(@"dealloc MyNum: 0x%p %i", self, self->i);
[super dealloc];
}
}
if (logValues) {
- [self logWithFormat:@" return value: %@ (%@,0x%08X)\n",
+ [self logWithFormat:@" return value: %@ (%@,0x%p)\n",
value ? value: @"<nil>", NSStringFromClass([value class]), value];
}
return value;
ms = [NSMutableString stringWithCapacity:32];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@" factories=#%d", [self->subfactories count]];
[ms appendFormat:@">"];
#if DEBUG_CTX_STACK
if (currentContextDepth == 1)
- printf("PUSHED first 0x%08X\n", self);
+ printf("PUSHED first 0x%p\n", self);
else
- printf("PUSHED[%i]: 0x%08X, prev 0x%08X",
+ printf("PUSHED[%i]: 0x%p, prev 0x%p",
currentContextDepth, self, ctxs[currentContextDepth - 2]);
NSAssert([[self class] activeObjectMappingContext] == self,
#if DEBUG_CTX_STACK
if (currentContextDepth == 1)
- printf("POP first 0x%08X\n", self);
+ printf("POP first 0x%p\n", self);
else
- printf("POP[%i]: 0x%08X, activate 0x%08X",
+ printf("POP[%i]: 0x%p, activate 0x%p",
currentContextDepth, self, ctxs[currentContextDepth - 2]);
#endif
currentContextDepth--;
/* description */
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: realm=%@ user=%@>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: realm=%@ user=%@>",
self, NSStringFromClass([self class]),
[self realm], [self userName]];
}
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]: name=%@",
+ [ms appendFormat:@"<0x%p[%@]: name=%@",
self, NSStringFromClass([self class]),
[self componentName]];
[ms appendString:@">"];
id t;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]: name=%@",
+ [ms appendFormat:@"<0x%p[%@]: name=%@",
self, NSStringFromClass([self class]),
[self name]];
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@" %@", self->methodName];
if (self->arguments)
[ms appendFormat:@" #args=%i", [self->arguments count]];
- (NSString *)description {
return [NSString stringWithFormat:
- @"<0x%08X[%@]: backends=%@>",
+ @"<0x%p[%@]: backends=%@>",
self, NSStringFromClass([self class]),
self->backends];
}
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]: name=%@",
+ [ms appendFormat:@"<0x%p[%@]: name=%@",
self, NSStringFromClass([self class]),
[self componentName]];
[ms appendFormat:@" url=%@", [self->url absoluteString]];
- (NSString *)loggingPrefix {
return [NSString stringWithFormat:
- @"XML-RPC Tx[%@] 0x%08X",
+ @"XML-RPC Tx[%@] 0x%p",
[self->invocation methodName], self];
}
- (NSString *)description {
return [NSString stringWithFormat:
- @"<0x%08X[%@]: server=%@>",
+ @"<0x%p[%@]: server=%@>",
self, NSStringFromClass([self class]),
self->registryServer];
}
@implementation ApTest
- (id)init {
- //printf("INIT 0x%08X ..\n", (unsigned int)self);
+ //printf("INIT 0x%p ..\n", (unsigned int)self);
return self;
}
- (void)dealloc {
- //printf("DEALLOC 0x%08X ..\n", (unsigned int)self);
+ //printf("DEALLOC 0x%p ..\n", (unsigned int)self);
[super dealloc];
}
id tmp;
ms = [NSMutableString stringWithCapacity:256];
- [ms appendFormat:@"<0x%08X[%@]: ", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]: ", self, NSStringFromClass([self class])];
- [ms appendFormat:@" 0x%08X ui=0x%08X", self->handle, [self userInfo]];
+ [ms appendFormat:@" 0x%p ui=0x%p", self->handle, [self userInfo]];
if ((tmp = [self path]))
[ms appendFormat:@" path=%@", tmp];
id tmp;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
- [ms appendFormat:@" 0x%08X", self->handle];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@" 0x%p", self->handle];
if ([self isAborted]) [ms appendString:@" aborted"];
if ([self usesKeepAlive]) [ms appendString:@" keepalive"];
va_end(ap);
#if DEBUG
- printf("|0x%08X| %s\n", (unsigned int)self, [[value description] cString]);
+ printf("|0x%p| %s\n", (unsigned int)self, [[value description] cString]);
#else
- NSLog(@"|0x%08X| %@", self, value);
+ NSLog(@"|0x%p| %@", self, value);
#endif
}
- (void)debugWithFormat:(NSString *)_format, ... {
va_end(ap);
#if DEBUG
- printf("|0x%08X|D %s\n", (unsigned int)self,
+ printf("|0x%p|D %s\n", (unsigned int)self,
[[value description] cString]);
#else
- NSLog(@"|0x%08X|D %@", self, value);
+ NSLog(@"|0x%p|D %@", self, value);
#endif
}
}
/* description */
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: apache=0x%08X>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: apache=0x%p>",
self, NSStringFromClass([self class]),
self->handle];
}
id tmp;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
- [ms appendFormat:@" 0x%08X", self->handle];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@" 0x%p", self->handle];
if ([self isHeadRequest]) [ms appendString:@" head"];
id tmp;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
- [ms appendFormat:@" 0x%08X", self->handle];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@" 0x%p", self->handle];
if ([self isVirtual])
[ms appendString:@" virtual"];
pool = [[NSAutoreleasePool alloc] init];
#if 0
- printf("\nSETUP 0x%08X (loaded=%s) ...\n", (unsigned int)self,
+ printf("\nSETUP 0x%p (loaded=%s) ...\n", (unsigned int)self,
self->bundleLoaded ? "yes" : "no");
fflush(stdout);
#endif
pool = [[NSAutoreleasePool alloc] init];
#if 0
- printf("TEARDOWN 0x%08X ...\n", (unsigned int)self);
+ printf("TEARDOWN 0x%p ...\n", (unsigned int)self);
fflush(stdout);
#endif
}
#if DEBUG && 0
- printf("CONFIGURE 0x%08X ...\n", (unsigned int)self);
+ printf("CONFIGURE 0x%p ...\n", (unsigned int)self);
fflush(stdout);
#endif
callCount++;
#if HEAVY_GSBUNDLE_DEBUG
- printf("%s: #%i module=0x%08X pid=%i "
- "(cmd=0x%08X,bp=0x%08X) ...\n",
+ printf("%s: #%i module=0x%p pid=%i "
+ "(cmd=0x%p,bp=0x%p) ...\n",
__PRETTY_FUNCTION__, callCount, (unsigned int)module, getpid(),
(unsigned int)cmd, (unsigned int)bundlePath);
fflush(stdout); fflush(stderr);