Module Object

Class "Object".

Functions

Object.string2type (str) module function.
Object.type2string (otype) module function.
Object:free () Destroy this object (will be called by Garbage Collector).
Object:id () object method.
Object:owner () object method.
Object:type () object method.


Functions

Object.string2type (str)
module function.

Parameters

  • str: Must be of type string.

Return value:

integer.
Object.type2string (otype)
module function.

Parameters

  • otype: Must be of type integer.

Return value:

string.
Object:free ()
Destroy this object (will be called by Garbage Collector).

Calls git_object_free:

This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how agressive is the caching mechanism used by the repository.

IMPORTANT: It *is* necessary to call this method when you stop using an object. Failure to do so will cause a memory leak.

Object:id ()
object method.

Calls git_object_id:

Return value:

OID.
Object:owner ()
object method.

Calls git_object_owner:

Freeing or calling `git_repository_close` on the returned pointer will invalidate the actual object.

Any other operation may be run on the repository without affecting the object.

Return value:

Repository.
Object:type ()
object method.

Calls git_object_type:

Return value:

string.

Valid XHTML 1.0!