-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PTPObjectInfo related improvements #1039
Commits on Oct 10, 2024
-
ptp2: move 'oid' variable into PTPObjectInfo as (Object) 'Handle'
The (Object) Handle member is not part of the "ObjectInfo dataset" in the specification but added here to avoid having to carry it around by separate means throughout the code base, as it is regularly required in combination. While the spec always refers to this item as "ObjectHandle", the term "Handle" is only used in this context, so we omit the "Object"-prefix for brevity. Switching from oid/ObjectID, which is nowere to be found the spec, increases consistency with the spec and the rest of the code base. This allows to remove the struct _PTPCanon_New_Object from the codebase. @msmeissn I added 2 TODO comments for you take a close look, pointing out: * a memory leak that I did not want to touch because I can't test it * a presumed bug fix where newobject was 0 when passed to ptp_getobject
Configuration menu - View commit details
-
Copy full SHA for cce04d5 - Browse repository at this point
Copy the full SHA cce04d5View commit details -
ptp2: replace (most) oid/object_id symbols with handle
See last commit for reasoning of choosing this terminology. TLDR: consistency spec / other API
Configuration menu - View commit details
-
Copy full SHA for 521c8e2 - Browse repository at this point
Copy the full SHA 521c8e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cfc782e - Browse repository at this point
Copy the full SHA cfc782eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fa578b - Browse repository at this point
Copy the full SHA 3fa578bView commit details -
ptp2: fix some potential memory leaks of PTPObjectInfo::Filename
This should better be fixed once and for all by replacing the heap allocated `char* Filename` with a statically sized buffer. If only I knew the 'correct' size for that. See also here: petabyt/camlib@20fb75a#r147761481
Configuration menu - View commit details
-
Copy full SHA for aa1241d - Browse repository at this point
Copy the full SHA aa1241dView commit details -
ptp2: replace PTPObjectHandles and PTPStorageIDs with generic array
This adds a set of macros implementing a generic array or list of TYPE. This is basically a TYPE* pointer and a length integer. This structure together with the typical use-cases repeats regularly throughout the codebase. It raises the level of abstraction and improves code readabilty. I'm a c++ developer and miss my STL ;). I'm starting here with PTPObjectHandles and PTPStorageIDs as those were already modeling an array abstraction. There are other arrays of stuff that can benefit from this later.
Configuration menu - View commit details
-
Copy full SHA for b9ab60d - Browse repository at this point
Copy the full SHA b9ab60dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f50134 - Browse repository at this point
Copy the full SHA 4f50134View commit details -
ci: fix CI build by add missing libltdl-dev on ubuntu
Looks like they changed the build image...
Configuration menu - View commit details
-
Copy full SHA for eefde03 - Browse repository at this point
Copy the full SHA eefde03View commit details -
Configuration menu - View commit details
-
Copy full SHA for 359993d - Browse repository at this point
Copy the full SHA 359993dView commit details -
ptp2: fix build failures on macos...
* apparently reallocarray() is not supported * the compiler seems to have an issue with a goto label position
Configuration menu - View commit details
-
Copy full SHA for a2718e5 - Browse repository at this point
Copy the full SHA a2718e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c0a27d - Browse repository at this point
Copy the full SHA 0c0a27dView commit details