[gjs] don't use PTRDIFF macro from private spidermonkey header
- From: Havoc Pennington <hp src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gjs] don't use PTRDIFF macro from private spidermonkey header
- Date: Mon, 4 Jan 2010 21:09:44 +0000 (UTC)
commit cabbbad0bc3977305d26b8a9da4dd54ab4880303
Author: Havoc Pennington <hp pobox com>
Date: Sun Jan 3 11:46:24 2010 -0500
don't use PTRDIFF macro from private spidermonkey header
In latest spidermonkey code this macro is gone, and it's not
clear to me what it did that just plain pointer math did not.
Maybe I'll find out when this breaks something.
jsstddef.h is gone in latest spidermonkey also.
modules/console.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/modules/console.c b/modules/console.c
index f2997f2..c19efba 100644
--- a/modules/console.c
+++ b/modules/console.c
@@ -50,7 +50,6 @@
#endif
#include <jsapi.h>
-#include <jsstddef.h> /* PTRDIFF */
#include <glib.h>
#include <glib/gprintf.h>
#include <gjs/gjs.h>
@@ -111,7 +110,7 @@ gjs_console_error_reporter(JSContext *cx, const char *message, JSErrorReport *re
report->linebuf,
(n > 0 && report->linebuf[n-1] == '\n') ? "" : "\n",
prefix);
- n = PTRDIFF(report->tokenptr, report->linebuf, char);
+ n = ((char*)report->tokenptr) - ((char*) report->linebuf);
for (i = j = 0; i < n; i++) {
if (report->linebuf[i] == '\t') {
for (k = (j + 8) & ~7; j < k; j++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]