celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject [Native-OSGi] Usage of arrays vs collections
Date Mon, 04 Jun 2012 13:01:13 GMT

I'm working on extracting the OSGi API's from Celix to the Native-OSGi
project. Celix uses a utils library through which Lists and Maps are

How do we want to solve this in the API? Following the OSGi API, often a
simple array is used (Celix uses an ArrayList in those cases). But the Java
Collection/Dictionary etc are also used.

A simple/portable solution would be to use arrays with an additional return
parameter for places where a collection/list is used. For example:

int bundleContext_getBundles(bundle_context_t context, bundle bundles[],
int *entries);

A similar solution can be used for Dictionaries as well, a simple key/value
struct can be used.

How do we want to solve this? I don't know of any standard C library, and
what about C++?

Met vriendelijke groet,

Alexander Broekhuis

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message