[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problems with a custom constant string class
From: |
Vincent Geddes |
Subject: |
Problems with a custom constant string class |
Date: |
Mon, 06 Aug 2007 00:37:44 +0200 |
Hi!
I am experimenting with Objective-C, and I am trying to create some
custom string classes.
The problem is that the gcc '-fconstant-string-class' option only seems
to allow custom classes which subclass `Object' (in the GNU runtime).
gcc keeps on giving me the error `interface 'GooConstantString' does not
have valid constant string layout' if I subclass anything other than
`Object'.
Is there any way I can have a constant string class that can subclass
anything other than `Object'?
Interfaces:
@interface GooObject
...
@end
@interface GooString : GooObject
...
@end
@interface GooConstantString : GooString
{
Class isa;
char *c_string;
unsigned int len;
}
@end
gcc -v:
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c
++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
regards,
Vincent
- Problems with a custom constant string class,
Vincent Geddes <=