|
From my understanding, rbtree_container_of is a macro rather than a function (although it may seem to share some function attributes). In what way would you hope to use rbtree_container_of in an RPG program/module?
The enum doesn't seem to be the problem.
I now tried it with __inline instead of inline. That at least compiled.
Google says that __inline is vendor/implementation specific.
I think I'll leave it at that.
But now I got another problem. The C header file defines a function:
# define rbtree_container_of(node, type, member) \
((type *)((char *)(node) - offsetof(type, member)))
This is a function I must use in my RPG program. How to do that?
It seems I am out of luck. Any ideas?
Thanx so far.
Mihael
-----Original Message-----
From: c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx
[mailto:c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx] On
Behalf Of Dennis
Sent: Tuesday, February 01, 2011 2:44 PM
To: C programming iSeries / AS400
Subject: Re: [C400-L] inline function
I wonder if it's the enum that's actually presenting you with a
problem. How do the other static inline's compile? All good? Some
good? (Sorry, I lack a C compiler when I'm at work, and I lack i6.1
altogether.
"Schmidt, Mihael" <Mihael.Schmidt@xxxxxxxxxxx> wrote:
No, inline without static gives the same error messages.*node)
https://github.com/fbuihuu/libtree/blob/master/rb.c
This is the source I try to compile.
Mihael
-----Original Message-----
From: c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx
[mailto:c400-l-bounces+mihael.schmidt=rossmann.de@xxxxxxxxxxxx] On
Behalf Of Erik Olsson
Sent: Tuesday, February 01, 2011 12:06 PM
To: C programming iSeries / AS400
Subject: Re: [C400-L] inline function
Does it work if you remove static?
2011/2/1 Schmidt, Mihael <Mihael.Schmidt@xxxxxxxxxxx>:
Hi,
I have some problems compiling a source with the following function:
static inline enum rb_color get_color(const struct rbtree_node
{for inline.
return node->color;
}
The error messages are:
CZM0166 : Definition of function inline requires parentheses.
...
CZM0485 : Parameter declaration list is incompatible with declarator
...Klaus Praus
If I remove inline everything compiles just fine.
Any idea?
Mihael Schmidt
Anwendungsentwicklung
Dirk Rossmann GmbH
Iserhägener Str.16
30938 Burgwedel
* +49 (05139) 898 - 4353
Handelsregister-Nr. HRB 120546, Amtsgericht Hannover
Ust-Id-Nr. DE 115055186
St.-Nr. 16 / 205 / 65401
Geschäftsführer: Dirk Roßmann, Alice Schardt-Roßmann, Roland Frobel,
--
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
Sent from my Galaxy tablet phone with with K-9 Mail. Please excuse my
brevity.
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
--
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.