libclang is more than that.
Xcode code highlighting and code indexing is based on lib clang, as well as
delta compilation. (and I have a remote plan of cloning Xcode for GNUstep)
Also, there was a friend of mine that created a translator that converts code
from a new language to C, and I modifi
Le 19 oct. 2013 à 15:01, Uli Kusterer a écrit :
> On 19 Oct 2013, at 01:17, Shane Stanley wrote:
>> On 19 Oct 2013, at 3:15 AM, Uli Kusterer
>> wrote:
>>
>>> this is what you'd do if you wanted to make e.g. CoreFoundation APIs
>>> accessible to a scripting language
>>
>> That's along the l
On 19 Oct 2013, at 01:17, Shane Stanley wrote:
> On 19 Oct 2013, at 3:15 AM, Uli Kusterer wrote:
>
>> this is what you'd do if you wanted to make e.g. CoreFoundation APIs
>> accessible to a scripting language
>
> That's along the lines of what I had in mind, although in this case for basic
>
On 18 Oct 2013, at 20:38, Kyle Sluder wrote:
> CFBundleGetFunctionPointerForName just calls dlsym.
Sure. NSLog also eventually calls syslog. I still wouldn’t drop down to syslog
for most Cocoa logging needs.
CFBundleGetFunctionPointerForName takes a CFStringRef and if you’re e.g.
looking at a
On Oct 18, 2013, at 7:30 PM, ChanMaxthon wrote:
> I think I know why it did not work: strip command can remove debug symbols,
> or unused functions as well.
Yep.
Charles
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post adm
I think I know why it did not work: strip command can remove debug symbols, or
unused functions as well.
Sent from my iPhone
> On 2013年10月19日, at 7:53, Charles Srstka wrote:
>
>> On Oct 18, 2013, at 6:42 PM, ChanMaxthon wrote:
>>
>> Try add this line:
>>
>> extern void foo(void);
>
> Alrea
On Oct 18, 2013, at 6:42 PM, ChanMaxthon wrote:
> Try add this line:
>
> extern void foo(void);
Already did; it doesn't work. See my follow-up post.
Charles
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests o
Try add this line:
extern void foo(void);
Sent from my iPhone
> On 2013年10月19日, at 1:21, Charles Srstka wrote:
>
>> On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote:
>>
>> I don't thinks strip remove info used by dynamic linker
>> Thus dlsym should work
>> As long as symbol is external (not
On 19 Oct 2013, at 3:15 AM, Uli Kusterer wrote:
> this is what you'd do if you wanted to make e.g. CoreFoundation APIs
> accessible to a scripting language
That's along the lines of what I had in mind, although in this case for basic
things like the trig functions in Math.h.
--
Shane Stanley
On Fri, Oct 18, 2013, at 10:39 AM, Uli Kusterer wrote:
> Oh, one more thing: Instead of dlsym(), you can also use
> CFBundleGetFunctionPointerForName() and its cohorts might also be useful
> for this if you want to go a bit more high-level. But even then, it needs
> to be an exported symbol in a dy
On Oct 18, 2013, at 6:15 PM, Uli Kusterer wrote:
> On Oct 18, 2013, at 4:48 AM, Shane Stanley wrote:
>> is there any way to build a call to a C function on the fly? I mean
>> something like pass a string to a method, and have it call the function of
>> that name?
>
>
> Short: No. Long: Maybe.
On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote:
> I don't thinks strip remove info used by dynamic linker
> Thus dlsym should work
> As long as symbol is external (not with hidden visibility) dlsym is able to
> find the symbol
> (stripped or not)
Trying to set the symbol to external doesn't
On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote:
> I don't thinks strip remove info used by dynamic linker
> Thus dlsym should work
> As long as symbol is external (not with hidden visibility) dlsym is able to
> find the symbol
> (stripped or not)
Not in my testing:
#import
#include
void
On 2013 Oct 18,, at 04:48, Shane Stanley
wrote:
is there any way to build a call to a C function on the fly? I mean
something like pass a string to a method, and have it call the
function of that name?
This at least used to be shown in the "Objective-C 2.0 Runtime
Programming Guide".
__
On Oct 18, 2013, at 4:48 AM, Shane Stanley wrote:
> is there any way to build a call to a C function on the fly? I mean something
> like pass a string to a method, and have it call the function of that name?
Short: No. Long: Maybe.
1) You can put a function in a dynamic library and export it
On Oct 17, 2013, at 8:49 PM, Charles Srstka wrote:
> You shouldn't rely on dlsym() working in production code. If the binary is
> stripped (as it is by default for release builds, I believe), it won't work.
You could work around that by exporting the symbol, e.g. by adding it to a
“.exp” file
You can certainly move everything into a library, also you can prevent
executables from being stripped in Xcode.
Sent from my iPhone
> On 2013年10月18日, at 11:54, Charles Srstka wrote:
>
> Loadable bundles and libraries don't get stripped. Executables, since they
> don't need to be loaded by an
On Oct 17, 2013, at 10:40 PM, Maxthon Chan wrote:
> You actually can, by using dlsym(3) to resolve the symbol, cast it to the
> appropriate function pointer and call it.
>
> For example:
>
> int (*myfunc)(int, int) = dlsym(RTLD_DEFAULT, myfunc_name);
> if (myfunc)
> printf(“%d”, myfunc(2,
You actually can, by using dlsym(3) to resolve the symbol, cast it to the
appropriate function pointer and call it.
For example:
int (*myfunc)(int, int) = dlsym(RTLD_DEFAULT, myfunc_name);
if (myfunc)
printf(“%d”, myfunc(2, 3));
else
fprintf(stderr, “error: cannot resolve symbol: %s”, my
On Oct 17, 2013, at 9:48 PM, Shane Stanley wrote:
> is there any way to build a call to a C function on the fly? I mean something
> like pass a string to a method, and have it call the function of that name?
No. That's an Objective-C feature that's not present in standard C.
Charles
is there any way to build a call to a C function on the fly? I mean something
like pass a string to a method, and have it call the function of that name?
--
Shane Stanley
'AppleScriptObjC Explored'
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple
My original reply was too long for Cocoa Dev; then I lost it.
So this is another (small draft)...
It appears I'll be working with blocks, keeping the data/functioning local
to the stack & copying data out to the GUI:
typedef sat_t (^MyBlock)();
// C - function:
int addFoot(int k) {
retur
Environment: iOS SDK 4.2+
Xcode 3.2.5
Desired design:
1) Multiple NSThreads (via NSOperation?) running NSObjects in parallel:
processing the same C-functions (with different data) in real time till
conclusion (or cancelled).
2) These C-functions are located in a common *.c file (or two
On Feb 15, 2009, at 1:32 PM, Martin Redington wrote:
In my projects, I tend to define methods which need access to member
variables as class methods, and related functions, which do not need
"direct" access to any internal object data, as C functions, like the
simple exa
to define methods which need access to member
>> variables as class methods, and related functions, which do not need
>> "direct" access to any internal object data, as C functions, like the
>> simple example below.
>>
>> @implementation FunctionTestAppController
>
On Feb 15, 2009, at 10:32 AM, Martin Redington wrote:
In my projects, I tend to define methods which need access to member
variables as class methods, and related functions, which do not need
"direct" access to any internal object data, as C functions, like the
simple exa
In my projects, I tend to define methods which need access to member
variables as class methods, and related functions, which do not need
"direct" access to any internal object data, as C functions, like the
simple example below.
@implementation FunctionTestAppController
+ (id) shared
On Thu, Nov 20, 2008 at 6:09 PM, Ken Tozier <[EMAIL PROTECTED]>
wrote:
> Just out of curiosity, why do you need to send such common math
> operations to a soap request? Wouldn't it be easier to do simple stuff
> like calculations in your Soap class and only make requests for the
> unique services t
, Jonathon Kuo
<[EMAIL PROTECTED]> wrote:
Just my 2 cents, but it seems an abuse to turn functions into
objects.
Functions don't retain state; objects do. Objective C very
gracefully allows
objects to call C functions. If you're doing something like [calc
addDoubleA:a withDoubleB:
t my 2 cents, but it seems an abuse to turn functions into
objects.
Functions don't retain state; objects do. Objective C very
gracefully allows
objects to call C functions. If you're doing something like [calc
addDoubleA:a withDoubleB:b], you've got a function masquerading
as an
s into
objects.
Functions don't retain state; objects do. Objective C very
gracefully allows
objects to call C functions. If you're doing something like [calc
addDoubleA:a withDoubleB:b], you've got a function masquerading
as an
object, which I think misses the entire point of OO
objects do. Objective C very
gracefully allows
objects to call C functions. If you're doing something like [calc
addDoubleA:a withDoubleB:b], you've got a function masquerading as
an
object, which I think misses the entire point of OOP.
It is common, if not appropriate, to have utilit
On Nov 20, 2008, at 2:07 PM, Shawn Erickson wrote:
On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo
<[EMAIL PROTECTED]> wrote:
Just my 2 cents, but it seems an abuse to turn functions into
objects.
Functions don't retain state; objects do. Objective C very
gracefully allows
object
egler wrote:
For a project that I'm working on, I have a need to write a code
generator that will wrap certain kinds of C functions as Objective C
messages on an Objective C proxy. Because I don't ultimately control
the input, the parameters on the C functions may be poorly named. I'
On Thu, Nov 20, 2008 at 1:23 PM, Jonathon Kuo
<[EMAIL PROTECTED]> wrote:
> Just my 2 cents, but it seems an abuse to turn functions into objects.
> Functions don't retain state; objects do. Objective C very gracefully allows
> objects to call C functions. If you're d
On Nov 19, 2008, at 9:27 PM, Austin Ziegler wrote:
For a project that I'm working on, I have a need to write a code
generator that will wrap certain kinds of C functions as Objective C
messages on an Objective C proxy. Because I don't ultimately control
the input, the parameter
On Thu, Nov 20, 2008 at 12:15 PM, Michael Ash <[EMAIL PROTECTED]> wrote:
> Please excuse a foolish question, but Why wrap this in Objective-C
> at all? Looks like the resulting ObjC code is essentially the same,
> except uglier, slower, and harder to use. Why not just keep the C and
> use it di
On Thu, Nov 20, 2008 at 12:27 AM, Austin Ziegler <[EMAIL PROTECTED]> wrote:
> For a project that I'm working on, I have a need to write a code
> generator that will wrap certain kinds of C functions as Objective C
> messages on an Objective C proxy. Because I don't ultim
On Nov 20, 2008, at 10:54 AM, Alexander Spohr wrote:
I’d go for #1.
If you have an error in status, throw an exception.
In this case, an exception might actually be OK, given that the
library is in isolation.
However, it goes against the design patterns of Cocoa and if the code
is ever re
On Nov 20, 2008, at 6:58 AM, Austin Ziegler wrote:
result = [calc addDoubleA:a withDoubleB:b]; // #1
Why not -addDouble:withDouble: ?
That is, why are you promoting the argument names into the method
signature? Especially since you're aware that the names are (most
often) useless.
res
Yes, I am. The C function definition that I showed was actually just a
SOAP service definition. What my proxy object will be calling are
about three or four different C functions to make the SOAP call,
hiding that complexity from the programmer. (I could just use C++ and
have this code generated
ng on, I have a need to write a code
generator that will wrap certain kinds of C functions as Objective C
messages on an Objective C proxy. Because I don't ultimately control
the input, the parameters on the C functions may be poorly named. I'm
looking for advice on how one might mak
For a project that I'm working on, I have a need to write a code
generator that will wrap certain kinds of C functions as Objective C
messages on an Objective C proxy. Because I don't ultimately control
the input, the parameters on the C functions may be poorly named. I'm
looking fo
On Fri, Mar 28, 2008 at 9:14 AM, Trygve Inda <[EMAIL PROTECTED]> wrote:
> I have a Cocoa object with .m and .h files and need to include in this a
> series of about 30 C functions which all all in their own .c file. Is it
> possible to give functions in the .c file access
I have a Cocoa object with .m and .h files and need to include in this a
series of about 30 C functions which all all in their own .c file. Is it
possible to give functions in the .c file access to the .m files instance
variables?
How can I do this without rewriting the .c functions as Obj-C
45 matches
Mail list logo