chiark / gitweb /
lib/sod.[ch] (sod_convert): Make the instance argument be `const void *'.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 25 Aug 2015 09:23:50 +0000 (10:23 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 25 Aug 2015 09:23:50 +0000 (10:23 +0100)
The documentation says that it should be, and I agree.

lib/sod.c
lib/sod.h

index bd600f9c9f265c03dcab4b37aaa1291d8581d4bf..bcaf6f69039eed16bd10ffccf9d4450e4637e57d 100644 (file)
--- a/lib/sod.c
+++ b/lib/sod.c
@@ -108,7 +108,7 @@ int sod_subclassp(const SodClass *sub, const SodClass *super)
  *             to know what C or S actually are.
  */
 
-void *sod_convert(const SodClass *cls, void *p)
+void *sod_convert(const SodClass *cls, const void *p)
 {
   const struct sod_instance *inst = p;
   const struct sod_vtable *vt = inst->_vt;
index 6a444e9c0a447c00efdf83253886e99ca20fc941..7f18f3593e27ab8a340f970b7ea73d6a21ae0d62 100644 (file)
--- a/lib/sod.h
+++ b/lib/sod.h
@@ -188,7 +188,7 @@ extern int sod_subclassp(const SodClass */*sub*/, const SodClass */*super*/);
  *             to know what either C or S actually are.
  */
 
-extern void *sod_convert(const SodClass */*cls*/, void */*p*/);
+extern void *sod_convert(const SodClass */*cls*/, const void */*p*/);
 
 /*----- That's all, folks -------------------------------------------------*/