<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/2e5c0669dd3b439ad453488ff03d78101074bc43">https://github.com/macports/macports-base/commit/2e5c0669dd3b439ad453488ff03d78101074bc43</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2e5c0669 make sure to set a deleteProc for registry objects
</span>2e5c0669 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2e5c0669dd3b439ad453488ff03d78101074bc43
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Fri Jun 11 18:16:01 2021 +1000
<span style='display:block; white-space:pre;color:#404040;'> make sure to set a deleteProc for registry objects
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Without this, the close functions like entry_close will delete the Tcl
</span><span style='display:block; white-space:pre;color:#404040;'> command but not the underlying object.
</span>---
src/registry2.0/util.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/registry2.0/util.c b/src/registry2.0/util.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 536774b5..5c7f0842 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/registry2.0/util.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/registry2.0/util.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -35,8 +35,11 @@
</span> #include <tcl.h>
#include "util.h"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "entry.h"
</span> #include "entryobj.h"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "file.h"
</span> #include "fileobj.h"
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#include "portgroup.h"
</span> #include "portgroupobj.h"
/**
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -182,7 +185,7 @@ int set_object(Tcl_Interp* interp, char* name, void* value, char* type,
</span> */
int set_entry(Tcl_Interp* interp, char* name, reg_entry* entry,
reg_error* errPtr) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_object(interp, name, entry, "entry", entry_obj_cmd, NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (set_object(interp, name, entry, "entry", entry_obj_cmd, delete_entry,
</span> errPtr)) {
entry->proc = strdup(name);
if (!entry->proc) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -205,7 +208,7 @@ int set_entry(Tcl_Interp* interp, char* name, reg_entry* entry,
</span> */
int set_file(Tcl_Interp* interp, char* name, reg_file* file,
reg_error* errPtr) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_object(interp, name, file, "file", file_obj_cmd, NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (set_object(interp, name, file, "file", file_obj_cmd, delete_file,
</span> errPtr)) {
file->proc = strdup(name);
if (!file->proc) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -228,7 +231,7 @@ int set_file(Tcl_Interp* interp, char* name, reg_file* file,
</span> */
int set_portgroup(Tcl_Interp* interp, char* name, reg_portgroup* portgroup,
reg_error* errPtr) {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if (set_object(interp, name, portgroup, "portgroup", portgroup_obj_cmd, NULL,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (set_object(interp, name, portgroup, "portgroup", portgroup_obj_cmd, delete_portgroup,
</span> errPtr)) {
portgroup->proc = strdup(name);
if (!portgroup->proc) {
</pre><pre style='margin:0'>
</pre>