Dereference an object link¶
ss_pers_deref
is a function defined in sspers.c.
Synopsis:
-
ss_persobj_t *
ss_pers_deref
(ss_pers_t *pers)¶
Description: Given a link to a persistent object, dereference that link and return a pointer to the object itself. This may involve reading a table into memory if this is the first dereference into that table.
This function is almost never invoked directly by client code. Instead, the client will use macros appropriate
for each object class which will check the link class and cast the return value to the appropriate type. For
instance, SS_FIELD
is a macro that takes a field object link as an argument, compile-time checks that the
argument is an ss_field_t
pointer, run-time check that the pointer is valid, and return an ss_fieldobj_t
pointer.
Return Value: Returns an object pointer on success; the null pointer on failure.
Parallel Notes: Independent
Issues: We should probably accumulate some sort of statistics here to make sure that the object caching is performing as expected.
See Also:
- Persistent Objects: Introduction for current chapter