[vlc-devel] commit: macosx/framework: Implement <NSCopying> for VLCTime. (Pierre d' Herbemont )

git version control git at videolan.org
Wed Aug 26 18:28:47 CEST 2009


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Wed Aug 26 18:24:35 2009 +0200| [ac8236da32fd1ab6d033f0f5e3f867fe4ce2924d] | committer: Pierre d'Herbemont 

macosx/framework: Implement <NSCopying> for VLCTime.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac8236da32fd1ab6d033f0f5e3f867fe4ce2924d
---

 projects/macosx/framework/Headers/Public/VLCTime.h |    2 +-
 projects/macosx/framework/Sources/VLCTime.m        |    5 +++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/projects/macosx/framework/Headers/Public/VLCTime.h b/projects/macosx/framework/Headers/Public/VLCTime.h
index 6ebac8b..e5276d7 100644
--- a/projects/macosx/framework/Headers/Public/VLCTime.h
+++ b/projects/macosx/framework/Headers/Public/VLCTime.h
@@ -27,7 +27,7 @@
 /**
  * Provides an object to define VLCMedia's time.
  */
- at interface VLCTime : NSObject
+ at interface VLCTime : NSObject <NSCopying>
 {
     NSNumber * value;       //< Holds, in seconds, the VLCTime value
 }
diff --git a/projects/macosx/framework/Sources/VLCTime.m b/projects/macosx/framework/Sources/VLCTime.m
index d145cd6..7afdeff 100644
--- a/projects/macosx/framework/Sources/VLCTime.m
+++ b/projects/macosx/framework/Sources/VLCTime.m
@@ -58,6 +58,11 @@
     [super dealloc];
 }
 
+- (id)copyWithZone:(NSZone *)zone
+{
+    return [[VLCTime alloc] initWithNumber:value];
+}
+
 /* NSObject Overrides */
 - (NSString *)description
 {




More information about the vlc-devel mailing list