add note to zero out new mextra and oextra fields

Closes #375
This commit is contained in:
nhmall
2020-07-31 08:31:09 -04:00
parent 67bc0a78ce
commit 6b7979fa72
2 changed files with 17 additions and 15 deletions

View File

@@ -389,7 +389,9 @@ struct obj {
* 4. Add a testing macro after the set of referencing macros
* (see has_oname(), has_omonst(), has_omailcmd(), and has_omin(),
* for examples).
* 5. Create newXX(otmp) function and possibly free_XX(otmp) function
* 5. Zero out the pointer to your struct in newmoextra() in
* src/mkobj.c.
* 6. Create newXX(otmp) function and possibly free_XX(otmp) function
* in an appropriate new or existing source file and add a prototype
* for it to include/extern.h. The majority of these are currently
* located in mkobj.c for convenience.
@@ -410,14 +412,14 @@ struct obj {
* }
* }
*
* 6. Adjust size_obj() in src/cmd.c appropriately.
* 7. Adjust dealloc_oextra() in src/mkobj.c to clean up
* 7. Adjust size_obj() in src/cmd.c appropriately.
* 8. Adjust dealloc_oextra() in src/mkobj.c to clean up
* properly during obj deallocation.
* 8. Adjust copy_oextra() in src/mkobj.c to make duplicate
* 9. Adjust copy_oextra() in src/mkobj.c to make duplicate
* copies of your struct or data onto another obj struct.
* 9. Adjust restobj() in src/restore.c to deal with your
* 10. Adjust restobj() in src/restore.c to deal with your
* struct or data during a restore.
* 10. Adjust saveobj() in src/save.c to deal with your
* 11. Adjust saveobj() in src/save.c to deal with your
* struct or data during a save.
*/