From 7d11f75a3ab3ccd903c6d9fac18b52ad9716fba1 Mon Sep 17 00:00:00 2001 From: Maximiliano Curia Date: Sat, 7 May 2016 09:15:28 +0200 Subject: pkgkde-symbolshelper: Add time_t type substitution. --- debian/changelog | 3 +++ perllib/Debian/PkgKde/SymbolsHelper/Substs.pm | 1 + .../Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index 257f033..3de1973 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ pkg-kde-tools (0.15.21) UNRELEASED; urgency=medium specified in the symbols file. * Use canonical URL in Vcs-Browser field. + [ Maximiliano Curia ] + * pkgkde-symbolshelper: Add time_t type substitution. + -- Debian Qt/KDE Maintainers Wed, 06 Jan 2016 20:52:49 +0300 pkg-kde-tools (0.15.20) unstable; urgency=medium diff --git a/perllib/Debian/PkgKde/SymbolsHelper/Substs.pm b/perllib/Debian/PkgKde/SymbolsHelper/Substs.pm index 4ebe58c..805a87a 100644 --- a/perllib/Debian/PkgKde/SymbolsHelper/Substs.pm +++ b/perllib/Debian/PkgKde/SymbolsHelper/Substs.pm @@ -36,6 +36,7 @@ our @TYPE_SUBSTS = ( "${NS}::TypeSubst::quintptr"->new(), "${NS}::TypeSubst::intptr_t"->new(), "${NS}::TypeSubst::qreal"->new(), + "${NS}::TypeSubst::time_t"->new(), ); our @CPP_TYPE_SUBSTS; diff --git a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm index b9da8a9..1dca05c 100644 --- a/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm +++ b/perllib/Debian/PkgKde/SymbolsHelper/Substs/TypeSubst.pm @@ -297,6 +297,26 @@ sub _expand { return ($arch =~ /^(arm|armeb|armel|armhf|sh4)$/) ? 'f' : 'd'; } +package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst::time_t; + +use strict; +use warnings; +use base 'Debian::PkgKde::SymbolsHelper::Substs::TypeSubst'; + +sub new { + my $class = shift; + my $self = $class->SUPER::new(@_); + $self->{substvar} = "{time_t}"; + $self->{types} = [ qw(x l) ]; # long long / long + return $self; +} + +sub _expand { + my ($self, $arch) = @_; + # see bits/types.h and bits/typesizes.h, long everywhere, except in x32 + return ($arch =~ /^(x32)$/) ? 'x' : 'l'; +} + package Debian::PkgKde::SymbolsHelper::Substs::TypeSubst; use strict; -- cgit v1.2.3