opaque-pointers Questions
11
Solved
Very often malloc() is absolutely not allowed when programming for embedded systems. Most of the time I'm pretty able to deal with this, but one thing irritates me: it keeps me from using so called...
Gensmer asked 14/12, 2010 at 14:59
4
Solved
I've seen both of the following two styles of declaring opaque types in C APIs. What are the various ways to declare opaque structs/pointers in C? Is there any clear advantage to using one style ov...
Ambiversion asked 19/10, 2010 at 4:13
3
I am designing an iterator interface for my hashmap data structure. The current design looks like this:
// map.h
typedef struct map_iterator map_iterator;
// map.c
struct map_iterator
{
// Imple...
Virtu asked 27/6, 2016 at 9:32
3
Solved
May I know the usage and logic behind the opaque pointer concept in C?
Classics asked 26/9, 2011 at 10:29
2
Solved
I am supposed to make a program based on a header file and some further description. The problem working with opaque type is needed. Opaque struct is declared in header file with some other functio...
Nabal asked 16/4, 2019 at 12:43
3
When designing a C interface, it is common to let into the public interface (.h) only what needs to be known by the user program.
Hence for example, the inner components of structures should remai...
Besides asked 2/7, 2015 at 22:16
1
Solved
I was using this code.
var audioUnit:AudioUnit = AudioUnit()
But in Xcode 7.3 (Swift 2.2) I am getting this warning. Any idea why? And how can I get rid of that?
N.B. Is I use nil then my progr...
Thorfinn asked 5/5, 2016 at 19:12
1
Solved
This question relates to coding in ISO C99 following the MISRAC:2012 guidelines.
I am looking for guidance on Dir 4.8 “If a pointer to a structure or union is never dereferenced within a translati...
Supper asked 11/2, 2016 at 14:23
2
A library defines an opaque data type:
struct OpaqueStruct;
and the client code has to obtain and release an OpaqueStruct*. I have access to the library source.
Unfortunately, neither shared_pt...
Malleolus asked 7/12, 2015 at 9:12
1
Solved
C99 -- specifically section 6.2.6.1, paragraph 4 -- states that copying an object representation into an array of unsigned char is allowed:
struct {
int foo;
double bar;
} baz;
unsigned char byt...
Putrescible asked 13/7, 2014 at 21:1
1
Solved
In the following example, how is it possible that ~CImpl is called correctly but when the class needs to be moved, the compiler says it has an incomplete type?
If the declaration of Impl is moved ...
Morgenthaler asked 26/2, 2014 at 16:45
1
I hope to understand internals of CoreFoundation CGColor object with this research. I could find a sample definition of CGColor structure from free quartz project which seems to match the IOS decla...
Mesmerism asked 26/10, 2013 at 14:31
1
Solved
I've defined an opaque structure and related APIs like this:
typedef struct foo foo;
foo *create_foo(...);
delete_foo(foo *f);
I am not able to define the structure in my c file. Gives redefinit...
Snowshoe asked 14/3, 2011 at 13:34
1
The answer to this quesion explains that opaque pointers are a good way to include C++ member variables in an Objective C++ header. I'm getting compile errors when trying to follow the example. Her...
Supererogate asked 17/3, 2010 at 16:22
3
Solved
Does someone have a good explanation of what an "opaque type" is? I saw that term in context of the CFBundleRef, where they were saying: "CFBundleRef opaque type". Is that a type that's readonly?
Cubby asked 9/4, 2009 at 17:21
1
© 2022 - 2024 — McMap. All rights reserved.