Commit 86fa089e authored by Stefan Monnier's avatar Stefan Monnier

* nsselect.m (symbol_to_nsstring, clean_local_selection_data)

(ns_string_to_pasteboard_internal):
* nsmenu.m (process_dialog):
* nsimage.m (ns_load_image): Use SDATA and ASET where appropriate.
* nsfont.m (nsfont_open): Use XHASH to make it compile with LISP_UNION.
* lisp.h (Fx_load_color_file): Declare.
parent 96d98c40
2009-04-13 Stefan Monnier <monnier@iro.umontreal.ca>
* nsselect.m (symbol_to_nsstring, clean_local_selection_data)
(ns_string_to_pasteboard_internal):
* nsmenu.m (process_dialog):
* nsimage.m (ns_load_image): Use SDATA and ASET where appropriate.
* nsfont.m (nsfont_open): Use XHASH to make it compile with LISP_UNION.
* lisp.h (Fx_load_color_file): Declare.
2009-04-13 Kenichi Handa <handa@m17n.org>
* font.c (font_delete_unmatched): Preserve the order of list
......
......@@ -3330,6 +3330,7 @@ EXFUN (Fx_focus_frame, 1);
/* Defined in xfaces.c */
EXFUN (Fclear_face_cache, 1);
EXFUN (Fx_load_color_file, 1);
extern void syms_of_xfaces P_ ((void));
#ifndef HAVE_GETLOADAVG
......
......@@ -576,7 +576,9 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
{
if (NSFONT_TRACE)
fprintf(stderr, "*** nsfont_open CACHE HIT!\n");
return (Lisp_Object)[cached unsignedLongValue];
// FIXME: Cast from (unsigned long) to Lisp_Object.
XHASH (font_object) = [cached unsignedLongValue];
return font_object;
}
else
{
......@@ -585,7 +587,7 @@ avoid creating multiple struct font objects (with metrics cache, etc.)
if (!synthItal)
[fontCache
setObject: [NSNumber numberWithUnsignedLong:
(unsigned long)font_object]
(unsigned long) XHASH (font_object)]
forKey: nsfont];
}
......
......@@ -93,7 +93,7 @@ Updated by Christian Limpach (chris@nice.ch)
}
else
{
NSData *data = [NSData dataWithBytes: XSTRING (spec_data)->data
NSData *data = [NSData dataWithBytes: SDATA (spec_data)
length: SBYTES (spec_data)];
eImg = [[EmacsImage alloc] initWithData: data];
[eImg setPixmapData];
......
......@@ -1717,11 +1717,11 @@ void process_dialog (id window, Lisp_Object list)
item = XCAR (list);
if (XTYPE (item) == Lisp_String)
{
[window addString: XSTRING (item)->data row: row++];
[window addString: SDATA (item) row: row++];
}
else if (XTYPE (item) == Lisp_Cons)
{
[window addButton: XSTRING (XCAR (item))->data
[window addButton: SDATA (XCAR (item))
value: XCDR (item) row: row++];
}
else if (NILP (item))
......@@ -1811,7 +1811,7 @@ void process_dialog (id window, Lisp_Object list)
if (XTYPE (head) == Lisp_String)
[title setStringValue:
[NSString stringWithUTF8String: XSTRING (head)->data]];
[NSString stringWithUTF8String: SDATA (head)]];
else if (isQ == YES)
[title setStringValue: @"Question"];
else
......
......@@ -62,7 +62,7 @@ Updated by Christian Limpach (chris@nice.ch)
if (EQ (sym, QPRIMARY)) return NSGeneralPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: XSTRING (XSYMBOL (sym)->xname)->data];
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
......@@ -113,7 +113,7 @@ Updated by Christian Limpach (chris@nice.ch)
return clean_local_selection_data (AREF (obj, 0));
copy = Fmake_vector (make_number (size), Qnil);
for (i = 0; i < size; i++)
AREF (copy, i) = clean_local_selection_data (AREF (obj, i));
ASET (copy, i, clean_local_selection_data (AREF (obj, i)));
return copy;
}
......@@ -150,7 +150,7 @@ Updated by Christian Limpach (chris@nice.ch)
CHECK_STRING (str);
utfStr = XSTRING (str)->data;
utfStr = SDATA (str);
nsStr = [NSString stringWithUTF8String: utfStr];
if (gtype == nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment