Skip to content
This repository
Browse code

Fixed some C++/Obj-C interop issues

  • Loading branch information...
commit b0425bc66d9e2d6b5597243c0274f9815248ec58 1 parent 567e77c
Dominic Szablewski authored
4 Classes/Ejecta/EJBindingBase.h
... ... @@ -1,7 +1,7 @@
1 1 #import <Foundation/Foundation.h>
2 2 #import "EJApp.h"
3 3
4   -id objc_msgSend(id theReceiver, SEL theSelector, ...);
  4 +#include <objc/message.h>
5 5
6 6 extern JSValueRef ej_global_undefined;
7 7
@@ -135,7 +135,7 @@ extern JSValueRef ej_global_undefined;
135 135 }
136 136
137 137 static inline bool JSStrIsEqualToStr( const JSChar * s1, const char * s2, int length ) {
138   - for( int i = 0; i < length && *s1 != '\0' && *s1 == *s2; i++ ) {
  138 + for( int i = 0; i < length && *s1 == *s2; i++ ) {
139 139 s1++;
140 140 s2++;
141 141 }
8 Classes/Ejecta/EJConvert.h
@@ -3,6 +3,10 @@
3 3 #import "EJCanvas/EJCanvasTypes.h"
4 4
5 5
  6 +#ifdef __cplusplus
  7 +extern "C" {
  8 +#endif
  9 +
6 10 NSString * JSValueToNSString( JSContextRef ctx, JSValueRef v );
7 11 JSValueRef NSStringToJSValue( JSContextRef ctx, NSString * string );
8 12 JSValueRef NSStringToJSValueProtect( JSContextRef ctx, NSString * string );
@@ -13,3 +17,7 @@ JSValueRef ColorRGBAToJSValue( JSContextRef ctx, EJColorRGBA c );
13 17
14 18 JSObjectRef ByteArrayToJSObject( JSContextRef ctx, unsigned char * bytes, int count );
15 19 void JSObjectToByteArray( JSContextRef ctx, JSObjectRef array, unsigned char * bytes, int count );
  20 +
  21 +#ifdef __cplusplus
  22 +}
  23 +#endif

0 comments on commit b0425bc

Please sign in to comment.
Something went wrong with that request. Please try again.