Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 511430 Details for
Bug 641990
net-libs/ptlib-2.10.11 - ptclib/podbc.cxx:1220:21: error: no match for ‘operator==’ (operand types are ‘PString’ and ‘char’)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to call IsEmpty
gentoo641990a.patch (text/plain), 1.10 KB, created by
Martin von Gagern
on 2017-12-22 00:32:36 UTC
(
hide
)
Description:
Patch to call IsEmpty
Filename:
MIME Type:
Creator:
Martin von Gagern
Created:
2017-12-22 00:32:36 UTC
Size:
1.10 KB
patch
obsolete
>Fix compiler problems with gcc 7, https://bugs.gentoo.org/641990. > >Recent gcc rejects â¹PString⺠== '\0'. I'm trying to work out what the >code actually was doing in those gcc versions where it did compile. >My assumption is that '\0' would get treated as ((const char*)null_ptr). > >include/ptlib/contain.inl says PString::operator==(const char *cstr) >does an InternalCompare invocation which is implemented in >src/ptlib/common/contain.cxx. That has an explicit check for NULL, and >in that case will do an IsEmpty() check, which in turn tests for NULL >array or '\0' at beginning of array. > >This the proposed fix is to call IsEmpty directly. > >diff --git a/src/ptclib/podbc.cxx b/src/ptclib/podbc.cxx >index 096413dbe..51f918197 100644 >--- a/src/ptclib/podbc.cxx >+++ b/src/ptclib/podbc.cxx >@@ -1217,7 +1217,7 @@ PString PODBCRecord::GetLongData(PINDEX Column) > > while (InternalGetData((USHORT)Column,sbin.GetPointer(len + 1),len,&cb)) > { >- if (sbin.Right(1) == '\0') // Remove Null Char >+ if (sbin.Right(1).IsEmpty()) // Remove Null Char > Data = Data + sbin.Left(sbin.GetLength()-1); > else > Data = Data + sbin;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 641990
:
511428
| 511430