[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110467: Fix wide-int related error a
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110467: Fix wide-int related error and cache error in NS font handling. |
Date: |
Mon, 08 Oct 2012 20:31:39 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110467
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Mon 2012-10-08 20:31:39 +0200
message:
Fix wide-int related error and cache error in NS font handling.
* nsfont.m (Vfonts_in_cache): New variable.
(nsfont_open): Use unsignedLongLongValue for cache in case wide ints
are used. Add cached fonts to Vfonts_in_cache.
(syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
modified:
src/ChangeLog
src/nsfont.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-10-08 14:37:04 +0000
+++ b/src/ChangeLog 2012-10-08 18:31:39 +0000
@@ -1,3 +1,10 @@
+2012-10-08 Jan Djärv <address@hidden>
+
+ * nsfont.m (Vfonts_in_cache): New variable.
+ (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
+ are used. Add cached fonts to Vfonts_in_cache.
+ (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
+
2012-10-08 Juanma Barranquero <address@hidden>
* makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2012-09-23 08:44:20 +0000
+++ b/src/nsfont.m 2012-10-08 18:31:39 +0000
@@ -53,6 +53,9 @@
extern int ns_tmp_flags;
extern struct nsfont_info *ns_tmp_font;
+static Lisp_Object Vfonts_in_cache;
+
+
/* font glyph and metrics caching functions, implemented at end */
static void ns_uni_to_glyphs (struct nsfont_info *font_info,
unsigned char block);
@@ -799,8 +802,7 @@
{
if (NSFONT_TRACE)
fprintf(stderr, "*** nsfont_open CACHE HIT!\n");
- /* FIXME: Cast from (unsigned long) to Lisp_Object. */
- XHASH (font_object) = [cached unsignedLongValue];
+ XHASH (font_object) = [cached unsignedLongLongValue];
return font_object;
}
else
@@ -808,9 +810,13 @@
font_object = font_make_object (VECSIZE (struct nsfont_info),
font_entity, pixel_size);
if (!synthItal)
- [fontCache setObject: [NSNumber numberWithUnsignedLong:
- (unsigned long) XHASH (font_object)]
- forKey: nsfont];
+ {
+ [fontCache setObject: [NSNumber
+ numberWithUnsignedLongLong:
+ (unsigned long long) XHASH (font_object)]
+ forKey: nsfont];
+ Vfonts_in_cache = Fcons (font_object, Vfonts_in_cache);
+ }
}
font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
@@ -1529,4 +1535,7 @@
doc: /* Internal use: maps font registry to Unicode script. */);
ascii_printable = NULL;
+
+ Vfonts_in_cache = Qnil;
+ staticpro (&Vfonts_in_cache);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110467: Fix wide-int related error and cache error in NS font handling.,
Jan D. <=