libytnef: properly initialize struct
Call TNEFInitialize on the TNEFStruct before use to make sure all fields are initialized to their default values. Since libytnef 2.0.0 zero-initialization is not sufficient.
This commit is contained in:
parent
7638d513ed
commit
b167550cab
2 changed files with 5 additions and 3 deletions
|
|
@ -44,11 +44,13 @@ namespace Ytnef {
|
|||
|
||||
[CCode (cname = "TNEFStruct", destroy_function="TNEFFree", has_type_id = false)]
|
||||
public struct TNEFStruct {
|
||||
[CCode (cname = "TNEFInitialize")]
|
||||
public TNEFStruct();
|
||||
Attachment starting_attach;
|
||||
}
|
||||
|
||||
[CCode (cname = "TNEFParseMemory", has_type_id = false)]
|
||||
public static int ParseMemory(uint8[] data, out TNEFStruct tnef);
|
||||
public static int ParseMemory(uint8[] data, ref TNEFStruct tnef);
|
||||
|
||||
[CCode (cname = "MAPIFindProperty")]
|
||||
public static unowned VariableLength* MAPIFindProperty(MAPIProps MAPI, uint tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue