All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.python.compiler.ConstantPool Maven / Gradle / Ivy

// Copyright (c) Corporation for National Research Initiatives
package org.python.compiler;

import java.util.*;
import java.io.*;

class Bytes
{
    public byte[] data;

    Bytes(ByteArrayOutputStream data) {
        this.data = data.toByteArray();
    }

    public boolean equals(Object o) {
        if (o instanceof Bytes) {
            byte[] odata = ((Bytes)o).data;
            int n = data.length;
            if (odata.length != n)
                return false;
            for (int i=0; i= sizes.length) {
                int[] new_sizes = new int[sizes.length*2];
                System.arraycopy(sizes, 0, new_sizes, 0, sizes.length);
                sizes = new_sizes;
            }
            sizes[index+1] = slots;
            index += slots;
        }
        //System.out.print("Constant: ");
        //for(int j=0; j




© 2015 - 2024 Weber Informatics LLC | Privacy Policy