[PPL-devel] [GIT] ppl/ppl(master): Documented a systematic assumption about the C interface opaque pointers.

Enea Zaffanella zaffanella at cs.unipr.it
Mon May 4 09:25:33 CEST 2009


Module: ppl/ppl
Branch: master
Commit: bae7441bfe49f3edf01238bb9cf09c654903456d
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=bae7441bfe49f3edf01238bb9cf09c654903456d

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Mon May  4 09:21:15 2009 +0200

Documented a systematic assumption about the C interface opaque pointers.

---

 interfaces/C/ppl_c_header.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/interfaces/C/ppl_c_header.h b/interfaces/C/ppl_c_header.h
index 5394555..e37b0ca 100644
--- a/interfaces/C/ppl_c_header.h
+++ b/interfaces/C/ppl_c_header.h
@@ -64,6 +64,15 @@ are that (1) applications do not depend on the internals of the library
 (these may change from release to release), and (2) the interface
 invariants can be thoroughly checked (by the access functions).
 
+\note
+All functions taking as input argument an opaque pointer datatype assume
+that such an argument is actually <em>referring to a valid PPL object</em>.
+For instance, a function with an argument having type
+<code>ppl_MIP_Problem_t</code> will expect a valid MIP_Problem object,
+previously initialized by calling, e.g., <code>ppl_new_MIP_Problem</code>.
+If that is not the case (e.g., if a null pointer is passed in),
+the behavior is undefined.
+
 The PPL's C interface is initialized by means of the
 <CODE>ppl_initialize</CODE> function.  This function must
 be called <EM>before using any other interface of the library</EM>.




More information about the PPL-devel mailing list