mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-21 02:31:01 +00:00
Compilation bug-fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@13907 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b98ab20521
commit
aa5da184f8
6 changed files with 23 additions and 11 deletions
|
@ -76,6 +76,8 @@ static IMP pushImp;
|
|||
static SEL popSel;
|
||||
static id (*popImp)(id obj, SEL sel);
|
||||
|
||||
static Class NSInvocation_class = nil;
|
||||
|
||||
@implementation STBytecodeInterpreter
|
||||
+ (void)initialize
|
||||
{
|
||||
|
@ -86,6 +88,8 @@ static id (*popImp)(id obj, SEL sel);
|
|||
sendSelectorAtIndexImp = [STBytecodeInterpreter instanceMethodForSelector:sendSelectorAtIndexSel];
|
||||
pushImp = [STStack instanceMethodForSelector:pushSel];
|
||||
popImp = [STStack instanceMethodForSelector:popSel];
|
||||
|
||||
NSInvocation_class = [NSInvocation class];
|
||||
}
|
||||
|
||||
+ (STBytecodeInterpreter *)sharedInterpreter
|
||||
|
@ -341,8 +345,8 @@ static id (*popImp)(id obj, SEL sel);
|
|||
|
||||
selector = [environment translateSelector:selector forReceiver:target];
|
||||
|
||||
invocation = [NSInvocation invocationWithTarget:target
|
||||
selectorName:selector];
|
||||
invocation = [NSInvocation_class invocationWithTarget:target
|
||||
selectorName:selector];
|
||||
|
||||
if(!invocation)
|
||||
{
|
||||
|
|
|
@ -42,8 +42,6 @@ static NSArray *methods_for_class(Class class)
|
|||
|
||||
methods = class->methods;
|
||||
|
||||
array = ;
|
||||
|
||||
while(methods)
|
||||
{
|
||||
for(i = 0; i < methods->method_count; i++)
|
||||
|
|
|
@ -39,8 +39,12 @@
|
|||
#import <StepTalk/STSelector.h>
|
||||
#import <StepTalk/STStructure.h>
|
||||
|
||||
static Class NSNumber_class = nil;
|
||||
static Class NSString_class = nil;
|
||||
static Class NSValue_class = nil;
|
||||
|
||||
#define CASE_NUMBER_TYPE(otype,type,msgtype)\
|
||||
case otype: object = [NSNumber numberWith##msgtype:*((type *)value)];\
|
||||
case otype: object = [NSNumber_class numberWith##msgtype:*((type *)value)];\
|
||||
NSDebugLLog(@"STStructure",\
|
||||
@" is number value '%@'", object);\
|
||||
break
|
||||
|
@ -73,12 +77,12 @@ id STObjectFromValueOfType(void *value, const char *type)
|
|||
CASE_NUMBER_TYPE(_C_FLT,float,Float);
|
||||
CASE_NUMBER_TYPE(_C_DBL,double,Double);
|
||||
case _C_PTR:
|
||||
object = [NSValue valueWithPointer:*((void **)value)];
|
||||
object = [NSValue_class valueWithPointer:*((void **)value)];
|
||||
NSDebugLLog(@"STStructure",
|
||||
@" is pointer value %p", *((void **)value));
|
||||
break;
|
||||
case _C_CHARPTR:
|
||||
object = [NSString stringWithCString:*((char **)value)];
|
||||
object = [NSString_class stringWithCString:*((char **)value)];
|
||||
NSDebugLLog(@"STStructure",
|
||||
@" is string value '%s'", *((char **)value));
|
||||
break;
|
||||
|
@ -178,6 +182,13 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject)
|
|||
|
||||
|
||||
@implementation NSInvocation(STAdditions)
|
||||
+ (void)initialize
|
||||
{
|
||||
NSNumber_class = [NSNumber class];
|
||||
NSString_class = [NSString class];
|
||||
NSValue_class = [NSValue class];
|
||||
}
|
||||
|
||||
+ invocationWithTarget:(id)target selectorName:(NSString *)selectorName
|
||||
{
|
||||
NSMethodSignature *signature;
|
||||
|
@ -197,7 +208,7 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject)
|
|||
return nil;
|
||||
}
|
||||
|
||||
invocation = [NSInvocation invocationWithMethodSignature:signature];
|
||||
invocation = [self invocationWithMethodSignature:signature];
|
||||
|
||||
[invocation setSelector:sel];
|
||||
[invocation setTarget:target];
|
||||
|
|
|
@ -414,7 +414,6 @@
|
|||
STClassInfo *class;
|
||||
NSString *selector;
|
||||
|
||||
selector = [selectorCache objecForKey:aString]
|
||||
class = [self findClassInfoForObject:anObject];
|
||||
|
||||
NSDebugLLog(@"STSending",
|
||||
|
|
|
@ -36,9 +36,8 @@
|
|||
#import <Foundation/NSString.h>
|
||||
#import <Foundation/NSValue.h>
|
||||
|
||||
@class NSProcessInfo ;
|
||||
/* FIXME: this is just for testing */
|
||||
#define SELECTOR_TYPES_COUNT 6
|
||||
|
||||
static const char *selector_types[] =
|
||||
{
|
||||
"@8@0:4",
|
||||
|
|
1
TODO
1
TODO
|
@ -2,3 +2,4 @@ TODO list
|
|||
|
||||
1 handle 'connection did die' notification for distant objects in STEnvironment
|
||||
2 fix class-info lookup for proxies in STEnvironment
|
||||
3 implement NSRect object
|
||||
|
|
Loading…
Reference in a new issue