change several IDL parameters to be unsigned, to work better with length_is, size_is. Preperatory to requiring unsigned in xpidl, fixing 13413

This commit is contained in:
mccabe%netscape.com 2000-04-28 10:51:52 +00:00
Родитель 4a99823d7d
Коммит b46e6e7a8c
10 изменённых файлов: 20 добавлений и 18 удалений

Просмотреть файл

@ -60,9 +60,9 @@ interface nsIGraphics : nsISupports
void invertArc(in nscoord x, in nscoord y, in nscoord width, in nscoord height, in float startAngle, in float endAngle);
void drawPolygon(in long count, [array, size_is(count)] in long points);
void fillPolygon(in long count, [array, size_is(count)] in long points);
void invertPolygon(in long count, [array, size_is(count)] in long points);
void drawPolygon(in unsigned long count, [array, size_is(count)] in long points);
void fillPolygon(in unsigned long count, [array, size_is(count)] in long points);
void invertPolygon(in unsigned long count, [array, size_is(count)] in long points);
void drawString(in wstring text, in nscoord x, in nscoord y);

Просмотреть файл

@ -110,17 +110,17 @@ NS_IMETHODIMP nsGraphicsImpl::InvertArc(nscoord x, nscoord y, nscoord width, nsc
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsGraphicsImpl::DrawPolygon(PRInt32 count, PRInt32 *points)
NS_IMETHODIMP nsGraphicsImpl::DrawPolygon(PRUint32 count, PRInt32 *points)
{
return mRenderer->DrawPolygon((nsPoint*)points, count / 2);
}
NS_IMETHODIMP nsGraphicsImpl::FillPolygon(PRInt32 count, PRInt32 *points)
NS_IMETHODIMP nsGraphicsImpl::FillPolygon(PRUint32 count, PRInt32 *points)
{
return mRenderer->FillPolygon((nsPoint*)points, count / 2);
}
NS_IMETHODIMP nsGraphicsImpl::InvertPolygon(PRInt32 count, PRInt32 *points)
NS_IMETHODIMP nsGraphicsImpl::InvertPolygon(PRUint32 count, PRInt32 *points)
{
// return mRenderer->InvertPolygon(points);
return NS_ERROR_NOT_IMPLEMENTED;

Просмотреть файл

@ -50,7 +50,7 @@ interface nsIMIMEInfo : nsISupports {
* @return Number of elements in the array.
* @return Array of extensions.
*/
void GetFileExtensions(out PRInt32 elementCount,
void GetFileExtensions(out PRUint32 elementCount,
[array, size_is(elementCount)] out string extensions);
/* Set File Extensions. Input is a comma deliminated list of extensions
@ -111,4 +111,4 @@ interface nsIMIMEInfo : nsISupports {
* @returns TRUE if the two are considered equal
*/
boolean Equals(in nsIMIMEInfo aMIMEInfo);
};
};

Просмотреть файл

@ -41,7 +41,7 @@ nsMIMEInfoImpl::GetExtCount() {
}
NS_IMETHODIMP
nsMIMEInfoImpl::GetFileExtensions(PRInt32 *elementCount, char ***extensions) {
nsMIMEInfoImpl::GetFileExtensions(PRUint32 *elementCount, char ***extensions) {
*elementCount = mExtensions.Count();
if (*elementCount < 1) return NS_OK;;

Просмотреть файл

@ -188,11 +188,11 @@ nsXMLMIMEDataSource::Add( nsIMIMEInfo* aMapper )
// Finally add an extension mapping.
char** extensions;
PRInt32 count;
PRUint32 count;
rv = aMapper->GetFileExtensions(& count, &extensions );
if ( NS_FAILED ( rv ) )
return rv;
for ( PRInt32 i = 0; i<count; i++ )
for ( PRUint32 i = 0; i<count; i++ )
{
key = extensions[i];
oldInfo = (nsMIMEInfoImpl*)mInfoObjects->Put(&key, aMapper);

Просмотреть файл

@ -41,7 +41,7 @@ nsMIMEInfoImpl::GetExtCount() {
}
NS_IMETHODIMP
nsMIMEInfoImpl::GetFileExtensions(PRInt32 *elementCount, char ***extensions) {
nsMIMEInfoImpl::GetFileExtensions(PRUint32 *elementCount, char ***extensions) {
*elementCount = mExtensions.Count();
if (*elementCount < 1) return NS_OK;;

Просмотреть файл

@ -464,7 +464,7 @@ NS_IMETHODIMP
nsCategoryManager::GetCategoryContents( const char *category,
char ***entries,
char ***values,
PRInt32 *count )
PRUint32 *count )
{
// BULLSHIT ALERT: Wasn't implemented in JS either.
// Will people use this? If not, let's get rid of it

Просмотреть файл

@ -80,7 +80,7 @@ interface nsICategoryManager : nsISupports
void getCategoryContents(in string category,
[array, size_is(count)] out string entries,
[array, size_is(count)] out string values,
[retval] out long count);
[retval] out unsigned long count);
const long OVERRIDE = 0;
const long FALLBACK = 1;

Просмотреть файл

@ -44,7 +44,8 @@ interface nsISupportsString : nsISupports
// do not include space for null termination in |length|. It is handled
// internally.
void setDataWithLength(in long length, [size_is(length)] in string data);
void setDataWithLength(in unsigned long length,
[size_is(length)] in string data);
};
[scriptable, uuid(d79dc970-4a1c-11d3-9890-006008962422)]
@ -55,7 +56,8 @@ interface nsISupportsWString : nsISupports
// do not include space for null termination in |length|. It is handled
// internally. |length| is in characters, not in bytes.
void setDataWithLength(in long length, [size_is(length)] in wstring data);
void setDataWithLength(in unsigned long length,
[size_is(length)] in wstring data);
};
/**

Просмотреть файл

@ -146,7 +146,7 @@ NS_IMETHODIMP nsSupportsStringImpl::ToString(char **_retval)
return GetData(_retval);
}
NS_IMETHODIMP nsSupportsStringImpl::SetDataWithLength(PRInt32 aLength, const char *aData)
NS_IMETHODIMP nsSupportsStringImpl::SetDataWithLength(PRUint32 aLength, const char *aData)
{
if(mData)
nsAllocator::Free(mData);
@ -212,7 +212,7 @@ NS_IMETHODIMP nsSupportsWStringImpl::ToString(PRUnichar **_retval)
// NOTE: assumes |length| does not include the null and null terminates itself. |length|
// is in characters, not bytes.
NS_IMETHODIMP nsSupportsWStringImpl::SetDataWithLength(PRInt32 aLength, const PRUnichar *aData)
NS_IMETHODIMP nsSupportsWStringImpl::SetDataWithLength(PRUint32 aLength, const PRUnichar *aData)
{
if(mData)
nsAllocator::Free(mData);