Unverified Commit abcd2093 authored by KonstantIMP's avatar KonstantIMP Committed by GitHub
Browse files

Patch DateTime class (#337)

* Fix incorrect generation for DateTime class

After GIR generation there is 2 the same constructors. It calls compilation errors and should be fixed

* Remove twice DateTime constructor declaration

It calls compilation errors and should be fixed
parent 74782fd9
......@@ -266,31 +266,6 @@ public class DateTime
this(cast(GstDateTime*) __p);
}
/**
* Creates a new #GstDateTime using the time since Jan 1, 1970 specified by
* @usecs. The #GstDateTime is in UTC.
*
* Params:
* usecs = microseconds from the Unix epoch
*
* Returns: a newly created #GstDateTime
*
* Since: 1.18
*
* Throws: ConstructionException GTK+ fails to create the object.
*/
public this(long usecs)
{
auto __p = gst_date_time_new_from_unix_epoch_utc_usecs(usecs);
if(__p is null)
{
throw new ConstructionException("null returned by new_from_unix_epoch_utc_usecs");
}
this(cast(GstDateTime*) __p);
}
/**
* Creates a new #GstDateTime using the date and times in the gregorian calendar
* in the local timezone.
......
......@@ -255,35 +255,6 @@ code: start
}
this(p); //, true);
}
/**
* Creates a new GstDateTime using the time since Jan 1, 1970 specified by
* secs.
*
* Params:
* secs = Seconds from the Unix epoch
* utc = If true use utc else use the local timezone.
* Throws: ConstructionException GTK+ fails to create the object.
*/
public this (long secs, bool utc)
{
GstDateTime* p;
if ( utc )
{
p = gst_date_time_new_from_unix_epoch_utc(secs);
}
else
{
p = gst_date_time_new_from_unix_epoch_local_time(secs);
}
if(p is null)
{
throw new ConstructionException("null returned by gst_date_time_new_from_unix_epoch_local_time(secs)");
}
this(p); //, true);
}
code: end
struct: DebugMessage
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment