Patches item #2929676, was opened at 2010-01-11 10:20 Message generated for change (Tracker Item Submitted) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2929676...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: puredata-dev Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: IOhannes m zmlnig (zmoelnig) Assigned to: Miller Puckette (millerpuckette) Summary: provide close() function
Initial Comment: Pd's API provides several functions to open a a file (e.g. canvas_open() or open_via_path()), but none to close the returned filehandle.
this is usually not a problem, since an external could call "close()" itself. unfortunately it doesn't work so well on some platforms that do not handle opening/closing resources across dll-boundaries so well. (on w32 you can link against a ton of debug/non-debug/threaded/non-threaded/... versions of stdc; and they are usually not compatible)
the solution is (hopefully) to supply a function the close()s a rsesource in the same context as it was open()ed.
the attached patch (against todays svn trunk) adds a "int sys_close(int fd)" that merely wraps the "int close(int fd)" call.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478072&aid=2929676...