[PD-cvs] SF.net SVN: pure-data: [9834] branches/pd-extended/v0-40/externals/hcs/ keyboard_layout.c

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Sat May 17 21:18:19 CEST 2008


Revision: 9834
          http://pure-data.svn.sourceforge.net/pure-data/?rev=9834&view=rev
Author:   eighthave
Date:     2008-05-17 12:18:19 -0700 (Sat, 17 May 2008)

Log Message:
-----------
got rid of 'type-punned pointer' warnings

Modified Paths:
--------------
    branches/pd-extended/v0-40/externals/hcs/keyboard_layout.c

Modified: branches/pd-extended/v0-40/externals/hcs/keyboard_layout.c
===================================================================
--- branches/pd-extended/v0-40/externals/hcs/keyboard_layout.c	2008-05-17 19:15:39 UTC (rev 9833)
+++ branches/pd-extended/v0-40/externals/hcs/keyboard_layout.c	2008-05-17 19:18:19 UTC (rev 9834)
@@ -22,12 +22,12 @@
 void keyboard_layout_bang(t_keyboard_layout *x) {
 	//OSStatus err;
 	KeyboardLayoutRef currentLayoutRef;
-	CFStringRef keyboardName;
+	const void *keyboardName;
 	char cKeyboardName[100];
 	
 	KLGetCurrentKeyboardLayout(&currentLayoutRef);
 	KLGetKeyboardLayoutProperty(currentLayoutRef, kKLName, (const void **)&keyboardName);
-	CFStringGetCString(keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
+	CFStringGetCString((CFStringRef)keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
 	
     outlet_symbol(x->x_data_outlet, gensym(cKeyboardName));
 }
@@ -35,7 +35,7 @@
 void keyboard_layout_menu(t_keyboard_layout *x) {
 	//OSStatus err;
 	KeyboardLayoutRef currentLayoutRef;
-	CFStringRef keyboardName;
+	const void *keyboardName;
 	char cKeyboardName[100];
 	CFIndex countOfLayouts;
 	CFIndex i;
@@ -48,7 +48,7 @@
 	for(i= 0; i<countOfLayouts; i++) {
 		KLGetKeyboardLayoutAtIndex(i, &currentLayoutRef);
 		KLGetKeyboardLayoutProperty(currentLayoutRef, kKLName, (const void **)&keyboardName);
-		CFStringGetCString(keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
+		CFStringGetCString((CFStringRef)keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
 		
 		SETSYMBOL(&name, gensym(cKeyboardName));
 // TODO this should probably output [menu append( so other messages work too
@@ -59,13 +59,13 @@
 void keyboard_layout_anything(t_keyboard_layout *x, t_symbol *s, short argc, t_atom *argv) {
 	//OSStatus err;
 	KeyboardLayoutRef currentLayoutRef;
-	CFStringRef keyboardName;
+	const void *keyboardName;
 	char cKeyboardName[100];
 	
 	keyboardName= CFStringCreateWithCString(NULL, s->s_name, kCFStringEncodingASCII);
 	KLGetKeyboardLayoutWithName(keyboardName, &currentLayoutRef);
 	KLGetKeyboardLayoutProperty(currentLayoutRef, kKLName, (const void **)&keyboardName);
-	CFStringGetCString(keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
+	CFStringGetCString((CFStringRef)keyboardName, cKeyboardName, 100, kCFStringEncodingASCII);
 	KLSetCurrentKeyboardLayout(currentLayoutRef);
 	//outlet_anything(x->t_out, s, 0, NULL);
 	keyboard_layout_bang(x);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list